Re: JSON w/ REST

2007-05-20 Thread Thilina Gunarathne

soapenv:Reason
soapenv:Text xml:lang=en-US
Mapped formatted JSON with namespaces are not supported in Axis2.
Make sure that your request doesn't include namespaces or use the
Badgerfish convention
/soapenv:Text
/soapenv:Reason

Badgerfish  Mapped are two JSON to XML conversion conventions..
Badgerfish supports namespaces while Mapped convention does not
support namespaces.

Please try changing your application/json message formatter
specified in the axis2.xml to
JSONBadgerfishMessageFormatter as given below...

   messageFormatters
   messageFormatter contentType=application/json

class=org.apache.axis2.json.JSONBadgerfishMessageFormatter/
   !-- more message formatters --
   /messageFormatters

Thanks,
Thilina

PS: For more information refer to JSON Support for Apache Axis2
(http://wso2.org/library/768)


thx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



action mappings in the service.xml file.

2007-05-20 Thread Jim Alateras

Hi,

When I use wsdl2code to generate my services.xml, stubs and skeletons 
how do i control the actionMapping uris that are generated and used in 
these files.


For instance the default actionMapping elements generated for my service 
are shown below


operation name=SetupStartElement
mep=http://www.w3.org/ns/wsdl/in-out;
  actionMapping\\/actionMapping

  outputActionMapping

http://www.ipsphereforum.org/ws/ipsf-framework/200703/ipsf-s3.wsdl/SMSChildPT/SetupStartElementResponse/outputActionMapping
/operation

but I would like to use the following

operation name=SetupStartElement 
mep=http://www.w3.org/ns/wsdl/in-out;

  actionMapping

urn:www.comware.com.au:ispshere:service:smschild:s3:SetupStartElementRequest
  /actionMapping

  outputActionMapping

urn:www.comware.com.au:ispshere:service:smschild:s3:SetupStartElementResponse
  /outputActionMapping
/operation

do I need to configure my wsdl or some other file to achieve this

cheers
/jima

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Doug Schaible

Good Morning,

How do you change the namespace that is used by the Axis engine when it
generates the SOAP body and envelope tags?  I am trying to call a .Net WS
and it expects soap:Body and soap:Envelope, but soapenv:Body and
soapenv:Envelope are being created.

Thanks,
Doug

Example of what is being generated:
?xml version=1.0 encoding=UTF-8?
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
soapenv:Body
/soapenv:Body
/soapenv:Envelope

The .Net WS is expecting this:
soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:soap=;
http://schemas.xmlsoap.org/soap/envelope/;
 soap:Body
   Login xmlns=http://BrassRing.WebServices.SSO/;
   /Login
 /soap:Body
/soap:Envelope


Nillable values in Axis 1.4

2007-05-20 Thread Verhovsky, Oleg
Hi I work with axis 1.3 in my wsdl declared type Test:

s:complexType name=Test

s:sequence

  s:element minOccurs=0 maxOccurs=1 name=boolField
type=s: boolean / 

  s:element minOccurs=1 maxOccurs=1 name=intField
type=s:int nillable=true /

  s:element minOccurs=0 maxOccurs=1 name=stringField
type=s:string /

/s

   /s:complexType

 

Instead of intField I passed null , and expect as in .NET to see
IntField xsi:nil=true / in generated SOAP.

But axis just omit this parameter like his minOccurence =0.

Can somebody please provide the way to convince Axis to send nill  in
SOAP .

Thanks Oleg



Re: Just point me in the right direction...

2007-05-20 Thread Pavan Madiraju

Hi All,

I am having trouble in installing axis2 application on Websphere 6.1. Did
anyone encounter this issue before ?

Error: java.lang.NoSuchMethodError:
javax/wsdl/Operation.getExtensibilityElements()Ljava/util/List; at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(
WSDL11ToAxisServiceBuilder.java:1010) at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populatePortType(
WSDL11ToAxisServiceBuilder.java:399) at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(
WSDL11ToAxisServiceBuilder.java:318) at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(
WSDL11ToAxisServiceBuilder.java:288) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(
ArchiveReader.java:232) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(
ArchiveReader.java:331) at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(
DeploymentEngine.java:582) at
org.apache.axis2.deployment.repository.util.WSInfoList.update(
WSInfoList.java:201) at
org.apache.axis2.deployment.RepositoryListener.update(
RepositoryListener.java:271) at
org.apache.axis2.deployment.RepositoryListener.checkServices(
RepositoryListener.java:189) at
org.apache.axis2.deployment.DeploymentEngine.loadServices(
DeploymentEngine.java:110) at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(
WarBasedAxisConfigurator.java:257) at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
(ConfigurationContextFactory.java:74) at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(
AxisServlet.java:486) at org.apache.axis2.transport.http.AxisServlet.init(
AxisServlet.java:406) at
org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:51)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185)
at 
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:316)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest

Thanks,
Pavan


Axis2 on Websphere 6.1

2007-05-20 Thread Pavan Madiraju

Hi All,

I am having trouble in installing axis2 application on Websphere 6.1. Did
anyone encounter this issue before ?

Error: java.lang.NoSuchMethodError:
javax/wsdl/Operation.getExtensibilityElements()Ljava/util/List; at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(
WSDL11ToAxisServiceBuilder.java:1010) at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populatePortType(
WSDL11ToAxisServiceBuilder.java:399) at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(
WSDL11ToAxisServiceBuilder.java:318) at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(
WSDL11ToAxisServiceBuilder.java:288) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(
ArchiveReader.java:232) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(
ArchiveReader.java:331) at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(
DeploymentEngine.java:582) at
org.apache.axis2.deployment.repository.util.WSInfoList.update(
WSInfoList.java:201) at
org.apache.axis2.deployment.RepositoryListener.update(
RepositoryListener.java:271) at
org.apache.axis2.deployment.RepositoryListener.checkServices(
RepositoryListener.java:189) at
org.apache.axis2.deployment.DeploymentEngine.loadServices(
DeploymentEngine.java:110) at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(
WarBasedAxisConfigurator.java:257) at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
(ConfigurationContextFactory.java:74) at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(
AxisServlet.java:486) at org.apache.axis2.transport.http.AxisServlet.init(
AxisServlet.java:406) at
org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:51)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185)
at 
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:316)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest

Thanks,


Re: [Axis2] SOAP header elements

2007-05-20 Thread Samisa Abeysinghe



Deepal Jayasinghe wrote:
 


Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.
  
   

That looks like too much work for me to get a simple thing done  :( 
Why not have some method like:

getLastResponseSoapEnvelope()
to service client API and do all the context access stuff within that
method ?
 


Idea is cool  I am +1 on doing that , but ...


One of the design goal of service client was to provide a convenient 
API  for  simple usage (cater for average users), and the assumption was

that user only trying to send  OM element and trying to get OM element .
If you need to do advanced work like accessing SOAP headers  , then you
can use OperationClient.


OK, cool, I forgot about operation client. However, there still remains a minor 
concern about the usability/maintainability of the stuff. This case is an ideal 
example - the use writes some code, and gets it working - now wants to do more 
with the API, and he/she has to switch from one API to the other to get the 
things done :(

Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2 1.1.1 WSDL2JAVA - Not generating java classes for wsdl:portType

2007-05-20 Thread Bo Xie

Hi,

 Just wondering if this is still an issue in Axis2 1.2 or I did not put the
parameters properly.

Thanks,
-Bo
On 5/17/07, Bo Xie [EMAIL PROTECTED] wrote:


Thanks, Amila. I tried your advice using no -pn and -sn. It still only
generated last one binding out of the 4. I used asix2 1.2 release.

Here is the command line. Anything I did not do right? Attached is the
output files and wsdl files. Sorry for the 500k size.

C:\programs\workwsdl2java -o output -p com.xyz.nbi -t -ss -sd -g -S src
-R src -uri wsrp_service.wsdl
Using AXIS2_HOME:   C:\programs\axis2-1.2
Using JAVA_HOME:C:\programs\jdk1.5.0_09
Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
'file:/C:/programs/work/'.
Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
Retrieving schema at 'wsrp_v1_types.xsd', relative to
'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
'file:/C:/programs/work/wsrp_v1_types.xsd'.
Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
'file:/C:/programs/work/'.
Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
Retrieving schema at 'wsrp_v1_types.xsd', relative to
'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
'file:/C:/programs/work/wsrp_v1_types.xsd'.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\InvalidHandleException.java file cannot
be overwritten.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\AccessDeniedException.java file cannot be
overwritten.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\InvalidRegistrationException.java file
cannot be overwritten.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\MissingParametersException.java file
cannot be overwritten.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\InvalidUserCategoryException.java file
cannot be overwritten.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\OperationFailedException.java file cannot
be overwritten.
May 17, 2007 11:55:31 AM 
org.apache.axis2.wsdl.codegen.writer.ClassWritercreateOutFile
INFO: The output\src\com\xyz\nbi\InconsistentParametersException.java file
cannot be overwritten.

Thanks,
-Bo
On 5/17/07, Amila Suriarachchi [EMAIL PROTECTED] wrote:



 On 5/17/07, Bo Xie [EMAIL PROTECTED]  wrote:
 
  Hi
 
   I tried on Axis2 1.2 release package. I see there is an -pn
  operation. Here is the command line I used. The skeleton file still only
  have the operations in the last port(see attached skeleton file).
 
  My questions are:
1. Is  -pn WSRPRegistrationService used correctly, why the
  skeleton file does not have the operations from this portType.


 pn is for port name not for port type.

   2. Is there any options to have wsdl2java generate all the portTypes
  in the WSDL.
 
  C:\programs\workwsdl2java -o output -p com.cisco.csm.nbi -t -ss -sd
  -g -S src -R src -pn WSRPRegistrationService -uri wsrp_service.wsdl


 if you do not use the -pn and -sn parameters it will generate the code
 for all bindings.

 Using AXIS2_HOME:   C:\programs\axis2- 1.2
  Using JAVA_HOME:C:\programs\jdk1.5.0_09
  Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
  'file:/C:/programs/work/'.
  Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
  'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
  Retrieving schema at 'wsrp_v1_types.xsd', relative to
  'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
  Retrieving schema at ' http://www.w3.org/2001/xml.xsd ', relative to
  'file:/C:/programs/work/wsrp_v1_types.xsd'.
  Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
  'file:/C:/programs/work/'.
  Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
  'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
  Retrieving schema at 'wsrp_v1_types.xsd', relative to
  'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
  Retrieving schema at ' http://www.w3.org/2001/xml.xsd ', relative to
  'file:/C:/programs/work/wsrp_v1_types.xsd'.
  May 16, 2007 6:05:12 PM
  org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
  INFO: The output\src\com\cisco\csm\nbi\InvalidHandleException.java
  file cannot be overwritten.
  May 16, 2007 6:05:12 PM
  org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
  INFO: The output\src\com\cisco\csm\nbi\AccessDeniedException.java file
  cannot be overwritten.
  May 16, 2007 6:05:12 PM
  org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
  INFO: The
  

Re: Capturing the SOAP Message

2007-05-20 Thread Demetris G


Can't you listen to the port that Axis will be wrtiting at using the 
locahost (127.0.0.1)

and print out the SOAP as XML text? Isn't that what you want to do?

Martin Gainty wrote:
Hard to determine what your looking for but looking at your 
ServiceLocator code the chronology would be something like:
//Assuming your class is called ObjectType you should declare your own 
ObjectTypeServiceLocator

ServiceLocator loc = new ServiceLocator();

//get the reference to the stored class (Object) via access to the 
method from the loc object from ServiceLocator

Object obj= loc.method();
 
//If the obj is a primitive type (String,Integer) then cast the obj 
obtained from the loc.method to expected DataType (for sake of 
argument we'll use String)

String str = (String)obj;
 
//If this NOT a primitive type (in other words some manner of Complex 
or class object) access the individual attributes

//Now You will be able to print the result
System.out.println(str);
 
//there is a comprehensive example located at 
$AXIS_HOME/addr/Main.java which calls the AddressBookServiceLocator which

//constructs the ServiceLocator
//sets the Default URL
//executes the doit(ab1) to populate the object and then access
//prints the response from the service's methods with declared print 
methods
 
//If on the other hand you want a more comprehensive tool to view ALL 
SOAP requests and responses I would look at tcpmon available at

http://ws.apache.org/commons/tcpmon/
 
M--

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please 
notify

the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message -
*From:* Doug Schaible mailto:[EMAIL PROTECTED]
*To:* axis-user@ws.apache.org mailto:axis-user@ws.apache.org
*Sent:* Friday, May 18, 2007 8:35 PM
*Subject:* Capturing the SOAP Message

 
Good Evening Everyone,
 
I have been working for several weeks to create a SOAP client

using AXIS to call a .Net Web Service.  I would like to be able to
capture the actual SOAP message that is being sent. 
 
From the WSDL file I ran WDSL2Java and then created this code for

my application:
 
 try

 {
  Login LoginData = new Login();
  LoginResponse LoginDataResponse = new LoginResponse();
  ServiceLocator loc = new ServiceLocator();
  ServiceSoap port = loc.getServiceSoap();
  LoginDataResponse = port.login(LoginData);
  out.println( LoginDataResponce + LoginDataResponse.toString() );
 }
 catch (java.rmi.RemoteException e)
 {
  out.println(pRemote Server Exception Message:  +
e.getMessage() );
   }
 catch (Exception e)
 {
out.println(This is an exception:  + e.toString());
 }
 
If anyone can tell me how to capture the actual SOAP message that

is being sent it would be great.
 
Also, if you notice anything in my code that does not appear

correct please let me know.  Help is much appreciated.
 
Thanks,

Doug



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Dennis Sosnoski

Hi Doug,

The namespaces are the same in your two samples - the namespace 
*prefixes* are different (soapenv vs. soap), but these are just 
placeholders. I suspect the real issue is that your SOAP Body element is 
missing the expected Login element.


How are you trying to call the service?

 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Doug Schaible wrote:

Good Morning,
 
How do you change the namespace that is used by the Axis engine when 
it generates the SOAP body and envelope tags?  I am trying to call a 
.Net WS and it expects soap:Body and soap:Envelope, but 
soapenv:Body and soapenv:Envelope are being created.
 
Thanks,

Doug
 
Example of what is being generated:

?xml version=1.0 encoding=UTF-8?
soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= 
http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

soapenv:Body
/soapenv:Body
/soapenv:Envelope
 
The .Net WS is expecting this:
soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema 
http://www.w3.org/2001/XMLSchemaxmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;

  soap:Body
Login xmlns= http://BrassRing.WebServices.SSO/;
/Login
  /soap:Body
/soap:Envelope


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Doug Schaible

Dennis,

It's interesting that you mentioned the Login element.  Leaving it out was
just a cut and paste mistake in the email, but I believe it is the problem.
The error that I am trying to correct is There is an error in XML document
(2, 16). --- The specified node cannot be inserted as the valid child of
this node, because the specified node is the wrong type. 


From my understand of .Net WS the (2,16) is telling me line two character

16.  The 16th character in the sencond line is the L in /Login.  I have
tried sending longer and shorter message to get the position of /Login to
move and every time I do the error continues to point to the L.

So, any ideas here?

My code and the SOAP message is below.

Thanks,
Doug





 MessageElement[] loginME = new MessageElement[1];
 loginME[0] = new MessageElement(new Text( XML ));

 LoginSSOXMLData LoginData = new LoginSSOXMLData(loginME);
 LoginResponseLoginResult LoginDataResponse = new
LoginResponseLoginResult();

 ServiceLocator loc = new ServiceLocator();
 loc.setServiceSoapEndpointAddress(
http://127.0.0.1/SSOEnterprise/webservice/sso.asmx;);

 ServiceSoap port = loc.getServiceSoap();
 LoginDataResponse = port.login(LoginData);


SOAP Message:
?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
http://www.w3.org/2001/XMLSchema; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLoginxmlns=
http://BrassRing.WebServices.SSO/;SSOXMLDatalt;gthttp://brassring.webservices.sso/%22%3E%3CSSOXMLData%3Elt;gt
;
/SSOXMLData/Login/soapenv:Body/soapenv:Envelope





On 5/20/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:


Hi Doug,

The namespaces are the same in your two samples - the namespace
*prefixes* are different (soapenv vs. soap), but these are just
placeholders. I suspect the real issue is that your SOAP Body element is
missing the expected Login element.

How are you trying to call the service?

- Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Doug Schaible wrote:
 Good Morning,

 How do you change the namespace that is used by the Axis engine when
 it generates the SOAP body and envelope tags?  I am trying to call a
 .Net WS and it expects soap:Body and soap:Envelope, but
 soapenv:Body and soapenv:Envelope are being created.

 Thanks,
 Doug

 Example of what is being generated:
 ?xml version=1.0 encoding=UTF-8?
 soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
 /soapenv:Body
 /soapenv:Envelope

 The .Net WS is expecting this:
 soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema
 http://www.w3.org/2001/XMLSchemaxmlns:soap=
http://schemas.xmlsoap.org/soap/envelope/;
   soap:Body
 Login xmlns= http://BrassRing.WebServices.SSO/;
 /Login
   /soap:Body
 /soap:Envelope

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Dennis Sosnoski
I don't know if it's just another copy-and-paste artifact, but the 
Login element namespace in your .NET sample has a leading space before 
the http://...;. If that space is really there, you'd need to have the 
space in your namespace, too. That's somewhat bizarre - namespace URIs 
should not start with spaces - but for most purposes namespace URIs are 
just compared as text strings, so all characters are significant.


Aside from that I can't offer much help. It's been a couple of years 
since I did anything with the original Axis, so I've lost touch with any 
issues.


 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Doug Schaible wrote:

Dennis,
 
It's interesting that you mentioned the Login element.  Leaving it 
out was just a cut and paste mistake in the email, but I believe it is 
the problem.  The error that I am trying to correct is There is an 
error in XML document (2, 16). --- The specified node cannot be 
inserted as the valid child of this node, because the specified node 
is the wrong type. 
 
From my understand of .Net WS the (2,16) is telling me line two 
character 16.  The 16th character in the sencond line is the L in 
/Login.  I have tried sending longer and shorter message to get the 
position of /Login to move and every time I do the error continues 
to point to the L.
 
So, any ideas here?
 
My code and the SOAP message is below.
 
Thanks,

Doug
 
 
 
 


  MessageElement[] loginME = new MessageElement[1];
  loginME[0] = new MessageElement(new Text( XML ));

  LoginSSOXMLData LoginData = new LoginSSOXMLData(loginME);
  LoginResponseLoginResult LoginDataResponse = new 
LoginResponseLoginResult();


  ServiceLocator loc = new ServiceLocator();
  
loc.setServiceSoapEndpointAddress(http://127.0.0.1/SSOEnterprise/webservice/sso.asmx;);

  ServiceSoap port = loc.getServiceSoap();
  LoginDataResponse = port.login(LoginData);

 


SOAP Message:
?xml version=1.0 encoding=UTF-8?soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= 
http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyLogin 
http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin 
xmlns=http://BrassRing.WebServices.SSO/;SSOXMLDatalt;gt 
http://brassring.webservices.sso/%22%3E%3CSSOXMLData%3Elt;gt;

/SSOXMLData/Login/soapenv:Body/soapenv:Envelope
 
 



 
On 5/20/07, *Dennis Sosnoski* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi Doug,

The namespaces are the same in your two samples - the namespace
*prefixes* are different (soapenv vs. soap), but these are just
placeholders. I suspect the real issue is that your SOAP Body
element is
missing the expected Login element.

How are you trying to call the service?

- Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Doug Schaible wrote:
 Good Morning,

 How do you change the namespace that is used by the Axis engine when
 it generates the SOAP body and envelope tags?  I am trying to call a
 .Net WS and it expects soap:Body and soap:Envelope, but
 soapenv:Body and soapenv:Envelope are being created.

 Thanks,
 Doug

 Example of what is being generated:
 ?xml version=1.0 encoding=UTF-8?
 soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=
 http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance
 soapenv:Body
 /soapenv:Body
 /soapenv:Envelope

 The .Net WS is expecting this:
 soap:Envelope xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema
 http://www.w3.org/2001/XMLSchema

http://www.w3.org/2001/XMLSchemaxmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
   soap:Body
 Login xmlns= http://BrassRing.WebServices.SSO/;
 /Login
   /soap:Body
 /soap:Envelope

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-20 Thread Jack Sprat
OK.  I was able to get the header elements using the getChildElements() method 
and iterating.

But the XMLBenas question remains.  How do I get at the class created by 
XMLBeans for these 2 header elements?

Thanks,
T


Jack Sprat [EMAIL PROTECTED] wrote: Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then how do I get the 
contents of the elements themselves?  In this case it is a user and password 
element.  The Axis2 JavaDocs have a return value of 
org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I don't 
have any docs for that type.

Also, does the class created by XMLBeans for the user and password elements 
come into play at all?  I was expecting to be able to pull in those classes 
created by XMLBeans for these 2  elements.

Thanks,
T


Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.

Thanks
Deepal
 Can anyone answer this question?  I thought this would be fairly
 common but I've not seen any tutorials or anything like that.
 Any help is appreciated.

 Thanks.
 T


 */Jack Sprat /* wrote:

 I am using Axis 1.2 with XML Beans and need to get the user and
 password  SOAP header elements.  I've set up an Axis2 handler and
 it is being called properly.
 My question is how exactly do I get the to the SOAP header elements?

 Thanks.
 T


Shape Yahoo! in your own image.   Join our Network Research Panel 
today!  
http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
   hot CTA = Join our Network Research Panel


   
-
Pinpoint customers who are looking for what you sell. 

Re: Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Doug Schaible

original Axis  I am really new to the whole WS world, so if something
better is out there let me know.

I am not sure about that space, but I am going to look into it.


On 5/20/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:


I don't know if it's just another copy-and-paste artifact, but the
Login element namespace in your .NET sample has a leading space before
the http://...;. If that space is really there, you'd need to have the
space in your namespace, too. That's somewhat bizarre - namespace URIs
should not start with spaces - but for most purposes namespace URIs are
just compared as text strings, so all characters are significant.

Aside from that I can't offer much help. It's been a couple of years
since I did anything with the original Axis, so I've lost touch with any
issues.

- Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Doug Schaible wrote:
 Dennis,

 It's interesting that you mentioned the Login element.  Leaving it
 out was just a cut and paste mistake in the email, but I believe it is
 the problem.  The error that I am trying to correct is There is an
 error in XML document (2, 16). --- The specified node cannot be
 inserted as the valid child of this node, because the specified node
 is the wrong type. 

 From my understand of .Net WS the (2,16) is telling me line two
 character 16.  The 16th character in the sencond line is the L in
 /Login.  I have tried sending longer and shorter message to get the
 position of /Login to move and every time I do the error continues
 to point to the L.

 So, any ideas here?

 My code and the SOAP message is below.

 Thanks,
 Doug





   MessageElement[] loginME = new MessageElement[1];
   loginME[0] = new MessageElement(new Text( XML ));

   LoginSSOXMLData LoginData = new LoginSSOXMLData(loginME);
   LoginResponseLoginResult LoginDataResponse = new
 LoginResponseLoginResult();

   ServiceLocator loc = new ServiceLocator();
   loc.setServiceSoapEndpointAddress(
http://127.0.0.1/SSOEnterprise/webservice/sso.asmx;);

   ServiceSoap port = loc.getServiceSoap();
   LoginDataResponse = port.login(LoginData);



 SOAP Message:
 ?xml version=1.0 encoding=UTF-8?soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
soapenv:BodyLogin
 
http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin
 xmlns=http://BrassRing.WebServices.SSO/;SSOXMLDatalt;gt
 http://brassring.webservices.sso/%22%3E%3CSSOXMLData%3Elt;gt;
 /SSOXMLData/Login/soapenv:Body/soapenv:Envelope





 On 5/20/07, *Dennis Sosnoski* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Hi Doug,

 The namespaces are the same in your two samples - the namespace
 *prefixes* are different (soapenv vs. soap), but these are just
 placeholders. I suspect the real issue is that your SOAP Body
 element is
 missing the expected Login element.

 How are you trying to call the service?

 - Dennis

 Dennis M. Sosnoski
 SOA and Web Services in Java
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



 Doug Schaible wrote:
  Good Morning,
 
  How do you change the namespace that is used by the Axis engine
when
  it generates the SOAP body and envelope tags?  I am trying to call
a
  .Net WS and it expects soap:Body and soap:Envelope, but
  soapenv:Body and soapenv:Envelope are being created.
 
  Thanks,
  Doug
 
  Example of what is being generated:
  ?xml version=1.0 encoding=UTF-8?
  soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
 http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=
  http://www.w3.org/2001/XMLSchema;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
 http://www.w3.org/2001/XMLSchema-instance
  soapenv:Body
  /soapenv:Body
  /soapenv:Envelope
 
  The .Net WS is expecting this:
  soap:Envelope xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema
  http://www.w3.org/2001/XMLSchema
 http://www.w3.org/2001/XMLSchemaxmlns:soap=
http://schemas.xmlsoap.org/soap/envelope/;
soap:Body
  Login xmlns= http://BrassRing.WebServices.SSO/;
  /Login
/soap:Body
  /soap:Envelope


-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL 

Re: Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Anne Thomas Manes

There's a newer SOAP engine called Axis2. See http://ws.apache.org/axis2/.

But either framework should work just fine. The .NET service should
provide you with a WSDL file. Submit that to the WSDL2Java tool (each
framework provides one of these tools), and it will generate a client
stub for you. Then invoke operations on the stub.

Anne

On 5/20/07, Doug Schaible [EMAIL PROTECTED] wrote:


original Axis  I am really new to the whole WS world, so if something
better is out there let me know.

I am not sure about that space, but I am going to look into it.



On 5/20/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
 I don't know if it's just another copy-and-paste artifact, but the
 Login element namespace in your .NET sample has a leading space before
 the http://...;. If that space is really there, you'd need to have the
 space in your namespace, too. That's somewhat bizarre - namespace URIs
 should not start with spaces - but for most purposes namespace URIs are
 just compared as text strings, so all characters are significant.

 Aside from that I can't offer much help. It's been a couple of years
 since I did anything with the original Axis, so I've lost touch with any
 issues.

 - Dennis

 Dennis M. Sosnoski
 SOA and Web Services in Java
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



 Doug Schaible wrote:
  Dennis,
 
  It's interesting that you mentioned the Login element.  Leaving it
  out was just a cut and paste mistake in the email, but I believe it is
  the problem.  The error that I am trying to correct is There is an
  error in XML document (2, 16). --- The specified node cannot be
  inserted as the valid child of this node, because the specified node
  is the wrong type. 
 
  From my understand of .Net WS the (2,16) is telling me line two
  character 16.  The 16th character in the sencond line is the L in
  /Login.  I have tried sending longer and shorter message to get the
  position of /Login to move and every time I do the error continues
  to point to the L.
 
  So, any ideas here?
 
  My code and the SOAP message is below.
 
  Thanks,
  Doug
 
 
 
 
 
MessageElement[] loginME = new MessageElement[1];
loginME[0] = new MessageElement(new Text( XML ));
 
LoginSSOXMLData LoginData = new LoginSSOXMLData(loginME);
LoginResponseLoginResult LoginDataResponse = new
  LoginResponseLoginResult();
 
ServiceLocator loc = new ServiceLocator();
 
loc.setServiceSoapEndpointAddress(http://127.0.0.1/SSOEnterprise/webservice/sso.asmx;);
 
ServiceSoap port = loc.getServiceSoap ();
LoginDataResponse = port.login(LoginData);
 
 
 
  SOAP Message:
  ?xml version=1.0 encoding=UTF-8?soapenv:Envelope
  xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
  http://www.w3.org/2001/XMLSchema;
  xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyLogin
  
http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin
 
xmlns=http://BrassRing.WebServices.SSO/;SSOXMLDatalt;gt
 
http://brassring.webservices.sso/%22%3E%3CSSOXMLData%3Elt;gt;
  /SSOXMLData/Login/soapenv:Body/soapenv:Envelope
 
 
 
 
 
  On 5/20/07, *Dennis Sosnoski* [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  Hi Doug,
 
  The namespaces are the same in your two samples - the namespace
  *prefixes* are different (soapenv vs. soap), but these are just
  placeholders. I suspect the real issue is that your SOAP Body
  element is
  missing the expected Login element.
 
  How are you trying to call the service?
 
  - Dennis
 
  Dennis M. Sosnoski
  SOA and Web Services in Java
  Axis2 Training and Consulting
  http://www.sosnoski.com - http://www.sosnoski.co.nz
  Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
 
 
 
  Doug Schaible wrote:
   Good Morning,
  
   How do you change the namespace that is used by the Axis engine
when
   it generates the SOAP body and envelope tags?  I am trying to call
a
   .Net WS and it expects soap:Body and soap:Envelope, but
   soapenv:Body and soapenv:Envelope are being created.
  
   Thanks,
   Doug
  
   Example of what is being generated:
   ?xml version=1.0 encoding=UTF-8?
   soapenv:Envelope
   xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/
  http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsd=
   http://www.w3.org/2001/XMLSchema;
  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
  http://www.w3.org/2001/XMLSchema-instance
   soapenv:Body
   /soapenv:Body
   /soapenv:Envelope
  
   The .Net WS is expecting this:
   soap:Envelope xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance 
   xmlns:xsd=http://www.w3.org/2001/XMLSchema
   http://www.w3.org/2001/XMLSchema
 
http://www.w3.org/2001/XMLSchemaxmlns:soap=http://schemas.xmlsoap.org/soap/envelope/

 

Re: Changing the namespace that is being generated by the Axis engine

2007-05-20 Thread Doug Schaible

Thanks Anne!

I just downloaded it and am playing now.

The WSDL2java tool generated ServiceServiceSoapStub.java,
ServiceServiceSoapCallbackHandler.java, and ServiceServiceSoap12Stub.java,
ServiceServiceSoap12CallbackHandler.java.

I just have to figure out how to use them now.  Hopefully the doc has an
example...

Doug


On 5/20/07, Anne Thomas Manes [EMAIL PROTECTED] wrote:


There's a newer SOAP engine called Axis2. See http://ws.apache.org/axis2/.

But either framework should work just fine. The .NET service should
provide you with a WSDL file. Submit that to the WSDL2Java tool (each
framework provides one of these tools), and it will generate a client
stub for you. Then invoke operations on the stub.

Anne

On 5/20/07, Doug Schaible [EMAIL PROTECTED] wrote:

 original Axis  I am really new to the whole WS world, so if something
 better is out there let me know.

 I am not sure about that space, but I am going to look into it.



 On 5/20/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
  I don't know if it's just another copy-and-paste artifact, but the
  Login element namespace in your .NET sample has a leading space
before
  the http://...;. If that space is really there, you'd need to have
the
  space in your namespace, too. That's somewhat bizarre - namespace URIs
  should not start with spaces - but for most purposes namespace URIs
are
  just compared as text strings, so all characters are significant.
 
  Aside from that I can't offer much help. It's been a couple of years
  since I did anything with the original Axis, so I've lost touch with
any
  issues.
 
  - Dennis
 
  Dennis M. Sosnoski
  SOA and Web Services in Java
  Axis2 Training and Consulting
  http://www.sosnoski.com - http://www.sosnoski.co.nz
  Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
 
 
 
  Doug Schaible wrote:
   Dennis,
  
   It's interesting that you mentioned the Login element.  Leaving it
   out was just a cut and paste mistake in the email, but I believe it
is
   the problem.  The error that I am trying to correct is There is an
   error in XML document (2, 16). --- The specified node cannot be
   inserted as the valid child of this node, because the specified node
   is the wrong type. 
  
   From my understand of .Net WS the (2,16) is telling me line two
   character 16.  The 16th character in the sencond line is the L in
   /Login.  I have tried sending longer and shorter message to get
the
   position of /Login to move and every time I do the error continues
   to point to the L.
  
   So, any ideas here?
  
   My code and the SOAP message is below.
  
   Thanks,
   Doug
  
  
  
  
  
 MessageElement[] loginME = new MessageElement[1];
 loginME[0] = new MessageElement(new Text( XML ));
  
 LoginSSOXMLData LoginData = new LoginSSOXMLData(loginME);
 LoginResponseLoginResult LoginDataResponse = new
   LoginResponseLoginResult();
  
 ServiceLocator loc = new ServiceLocator();
  
 loc.setServiceSoapEndpointAddress(
http://127.0.0.1/SSOEnterprise/webservice/sso.asmx;);
  
 ServiceSoap port = loc.getServiceSoap ();
 LoginDataResponse = port.login(LoginData);
  
  
  
   SOAP Message:
   ?xml version=1.0 encoding=UTF-8?soapenv:Envelope
   xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
   http://www.w3.org/2001/XMLSchema;
   xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyLogin
   

http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin
  
 xmlns=http://BrassRing.WebServices.SSO/;SSOXMLDatalt;gt
  
 http://brassring.webservices.sso/%22%3E%3CSSOXMLData%3Elt;gt;
   /SSOXMLData/Login/soapenv:Body/soapenv:Envelope
  
  
  
  
  
   On 5/20/07, *Dennis Sosnoski* [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
  
   Hi Doug,
  
   The namespaces are the same in your two samples - the namespace
   *prefixes* are different (soapenv vs. soap), but these are
just
   placeholders. I suspect the real issue is that your SOAP Body
   element is
   missing the expected Login element.
  
   How are you trying to call the service?
  
   - Dennis
  
   Dennis M. Sosnoski
   SOA and Web Services in Java
   Axis2 Training and Consulting
   http://www.sosnoski.com - http://www.sosnoski.co.nz
   Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
  
  
  
   Doug Schaible wrote:
Good Morning,
   
How do you change the namespace that is used by the Axis
engine
 when
it generates the SOAP body and envelope tags?  I am trying to
call
 a
.Net WS and it expects soap:Body and soap:Envelope, but
soapenv:Body and soapenv:Envelope are being created.
   
Thanks,
Doug
   
Example of what is being generated:
?xml version=1.0 encoding=UTF-8?
soapenv:Envelope
xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/
   http://schemas.xmlsoap.org/soap/envelope/
 xmlns:xsd=

Re: [Axis2] SOAP header elements

2007-05-20 Thread Eran Chinthaka
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa and all,

You have a very good point here, except that you started from the wrong
class. The complete API for the users to use is the OperationClient API.
But since most users, yes *most* user's concern is to send and receieve
XML fragment which is supported in ServiceClient API.

There are lots of things missing in ServiceClient. From the day one
ServiceClient API was meant to be the simple API for simple work. Most
of the users do not look at SOAP message. Especially because of J2EE
containers users even do not look at the XML fragment. That is why we
gave a convenient API on top of OperationClient.

If you want to look at the SOAP message or if you want to change the
engine or if you want to change MEP, then we consider that as an
advanced operation which require him to use OperationClient. One can
come-up with various use cases which seems simple to them and might
wonder why it is not included in ServiceClient. The simple answer is
Axis2 was there for a long time, more than 2 years and ServiceClient
must have been there at least for 2 years, but we found out that users
are satisfied with the existing way of only dealing with OMElement in
and OMElement out.

Again I totally agree with you that users need to face extra bit of
hassle when they want to add little bit more to what they are using with
ServiceClient, but that is intentional.

Thanks,
Chinthaka

Samisa Abeysinghe wrote:
 
 Deepal Jayasinghe wrote:
  

 Hi Jack ,
 If this is in the server side , you can get the message context and
 from
 that you can get the SOAP envelope and from the soap envelope you can
 get the soap headers.

 If it is the in the client side  , the the process is ,
  - First you get the last operation context from the service client
  - and then follow the above steps.
   
   
 That looks like too much work for me to get a simple thing done  :(
 Why not have some method like:
 getLastResponseSoapEnvelope()
 to service client API and do all the context access stuff within that
 method ?
  

 Idea is cool  I am +1 on doing that , but ...
 
 One of the design goal of service client was to provide a convenient
 API  for  simple usage (cater for average users), and the assumption was
 that user only trying to send  OM element and trying to get OM element .
 If you need to do advanced work like accessing SOAP headers  , then you
 can use OperationClient.
 
 OK, cool, I forgot about operation client. However, there still remains
 a minor concern about the usability/maintainability of the stuff. This
 case is an ideal example - the use writes some code, and gets it working
 - now wants to do more with the API, and he/she has to switch from one
 API to the other to get the things done :(
 
 Samisa...
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUQifjON2uBzUhh8RAl3SAJ4uCtbs4pElSKfbr1eOQtvSoExRhgCfb438
2aPufLx7Sthf8JSgzpf3joQ=
=6WJN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-20 Thread keith chapman

Hi jack,

U can use the following once you have the SOAPEnvelop to get the header
block.

SOAPHeader header = envelope.getHeader();

Once you get that you can get the specific header you want by using
header.getHeaderBlocksWithNSURI();

or get all the headers and iterate through them using
header.getChildren();

Once you have the header block you can drill down to the xmlBeans class.

Thanks,
Keith.


On 5/21/07, Jack Sprat [EMAIL PROTECTED] wrote:


OK.  I was able to get the header elements using the getChildElements()
method and iterating.

But the XMLBenas question remains.  How do I get at the class created by
XMLBeans for these 2 header elements?

Thanks,
T


*Jack Sprat [EMAIL PROTECTED]* wrote:

Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then how do I
get the contents of the elements themselves?  In this case it is a user and
password element.  The Axis2 JavaDocs have a return value of
org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I
don't have any docs for that type.

Also, does the class created by XMLBeans for the user and password
elements come into play at all?  I was expecting to be able to pull in those
classes created by XMLBeans for these 2 elements.

Thanks,
T


*Deepal Jayasinghe [EMAIL PROTECTED]* wrote:

Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side , the the process is ,
- First you get the last operation context from the service client
- and then follow the above steps.

Thanks
Deepal
 Can anyone answer this question? I thought this would be fairly
 common but I've not seen any tutorials or anything like that.
 Any help is appreciated.

 Thanks.
 T


 */Jack Sprat /* wrote:

 I am using Axis 1.2 with XML Beans and need to get the user and
 password SOAP header elements. I've set up an Axis2 handler and
 it is being called properly.
 My question is how exactly do I get the to the SOAP header elements?

 Thanks.
 T



Shape Yahoo! in your own image. Join our Network Research Panel today!
http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7hot
 CTA = Join our Network Research Panel


--
Pinpoint customers
http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226cmp=Yahooctv=AprNIs=Ys2=EMb=50who
are looking for what you sell.





--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: Axis2 1.1.1 WSDL2JAVA - Not generating java classes for wsdl:portType

2007-05-20 Thread Amila Suriarachchi

Can you send your wsdl? do you have ports for each bining?
Actually code is generated per port.

On 5/20/07, Bo Xie [EMAIL PROTECTED] wrote:


Hi,

  Just wondering if this is still an issue in Axis2 1.2 or I did not put
the parameters properly.

Thanks,
-Bo
On 5/17/07, Bo Xie  [EMAIL PROTECTED] wrote:

 Thanks, Amila. I tried your advice using no -pn and -sn. It still only
 generated last one binding out of the 4. I used asix2 1.2 release.

 Here is the command line. Anything I did not do right? Attached is the
 output files and wsdl files. Sorry for the 500k size.

 C:\programs\workwsdl2java -o output -p com.xyz.nbi -t -ss -sd -g -S src
 -R src -uri wsrp_service.wsdl
 Using AXIS2_HOME:   C:\programs\axis2-1.2
 Using JAVA_HOME:C:\programs\jdk1.5.0_09
 Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
 'file:/C:/programs/work/'.
 Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
 'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
 Retrieving schema at 'wsrp_v1_types.xsd', relative to
 'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
 Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
 'file:/C:/programs/work/wsrp_v1_types.xsd'.
 Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
 'file:/C:/programs/work/'.
 Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
 'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
 Retrieving schema at 'wsrp_v1_types.xsd', relative to
 'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
 Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
 'file:/C:/programs/work/wsrp_v1_types.xsd'.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\InvalidHandleException.java file cannot
 be overwritten.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\AccessDeniedException.java file cannot
 be overwritten.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\InvalidRegistrationException.java file
 cannot be overwritten.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\MissingParametersException.java file
 cannot be overwritten.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\InvalidUserCategoryException.java file
 cannot be overwritten.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\OperationFailedException.java file
 cannot be overwritten.
 May 17, 2007 11:55:31 AM
 org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
 INFO: The output\src\com\xyz\nbi\InconsistentParametersException.java
 file cannot be overwritten.

 Thanks,
 -Bo
 On 5/17/07, Amila Suriarachchi [EMAIL PROTECTED] wrote:
 
 
 
  On 5/17/07, Bo Xie [EMAIL PROTECTED]  wrote:
  
   Hi
  
I tried on Axis2 1.2 release package. I see there is an -pn
   operation. Here is the command line I used. The skeleton file still only
   have the operations in the last port(see attached skeleton file).
  
   My questions are:
 1. Is  -pn WSRPRegistrationService used correctly, why the
   skeleton file does not have the operations from this portType.
 
 
  pn is for port name not for port type.
 
2. Is there any options to have wsdl2java generate all the portTypes
   in the WSDL.
  
   C:\programs\workwsdl2java -o output -p com.cisco.csm.nbi -t -ss -sd
   -g -S src -R src -pn WSRPRegistrationService -uri wsrp_service.wsdl
 
 
  if you do not use the -pn and -sn parameters it will generate the code
  for all bindings.
 
  Using AXIS2_HOME:   C:\programs\axis2- 1.2
   Using JAVA_HOME:C:\programs\jdk1.5.0_09
   Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
   'file:/C:/programs/work/'.
   Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
   'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
   Retrieving schema at 'wsrp_v1_types.xsd', relative to
   'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
   Retrieving schema at ' http://www.w3.org/2001/xml.xsd ', relative to
   'file:/C:/programs/work/wsrp_v1_types.xsd'.
   Retrieving document at 'wsrp_v1_bindings.wsdl', relative to
   'file:/C:/programs/work/'.
   Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to
   'file:/C:/programs/work/wsrp_v1_bindings.wsdl'.
   Retrieving schema at 'wsrp_v1_types.xsd', relative to
   'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'.
   Retrieving schema at ' http://www.w3.org/2001/xml.xsd ', relative to
   'file:/C:/programs/work/wsrp_v1_types.xsd'.
   May 16, 2007 6:05:12 PM
   org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
   INFO: The output\src\com\cisco\csm\nbi\InvalidHandleException.java
   file cannot be overwritten.
   May 16, 2007 6:05:12 PM
   

Service vs. Operation client APIs [was Re: [Axis2] SOAP header elements]

2007-05-20 Thread Samisa Abeysinghe
OK, I really do not want to criticize the client API here, specially 
given that it has been around for more than two years.


However, I have a problem when deciding whether to use the service 
client or operation client API for my implementation.
As an example, in operation client, I do not have an API to engage a 
module but with service client I can. However if I want to access the 
SOAP envelope or play around with SOAP level stuff, I have to use 
operation client. Now I am confused as to what I should be using. How 
should I go about making my decision? If you can point me to some docs 
that would be great.


Samisa...

Eran Chinthaka wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa and all,

You have a very good point here, except that you started from the wrong
class. The complete API for the users to use is the OperationClient API.
But since most users, yes *most* user's concern is to send and receieve
XML fragment which is supported in ServiceClient API.

There are lots of things missing in ServiceClient. From the day one
ServiceClient API was meant to be the simple API for simple work. Most
of the users do not look at SOAP message. Especially because of J2EE
containers users even do not look at the XML fragment. That is why we
gave a convenient API on top of OperationClient.

If you want to look at the SOAP message or if you want to change the
engine or if you want to change MEP, then we consider that as an
advanced operation which require him to use OperationClient. One can
come-up with various use cases which seems simple to them and might
wonder why it is not included in ServiceClient. The simple answer is
Axis2 was there for a long time, more than 2 years and ServiceClient
must have been there at least for 2 years, but we found out that users
are satisfied with the existing way of only dealing with OMElement in
and OMElement out.

Again I totally agree with you that users need to face extra bit of
hassle when they want to add little bit more to what they are using with
ServiceClient, but that is intentional.

Thanks,
Chinthaka

Samisa Abeysinghe wrote:
 


Deepal Jayasinghe wrote:
   




 


Hi Jack ,
If this is in the server side , you can get the message context and
from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
- First you get the last operation context from the service client
- and then follow the above steps.
 
   

 
That looks like too much work for me to get a simple thing done  :(

Why not have some method like:
getLastResponseSoapEnvelope()
to service client API and do all the context access stuff within that
method ?
   




Idea is cool  I am +1 on doing that , but ...
 


One of the design goal of service client was to provide a convenient
API  for  simple usage (cater for average users), and the assumption was
that user only trying to send  OM element and trying to get OM element .
If you need to do advanced work like accessing SOAP headers  , then you
can use OperationClient.
 


OK, cool, I forgot about operation client. However, there still remains
a minor concern about the usability/maintainability of the stuff. This
case is an ideal example - the use writes some code, and gets it working
- now wants to do more with the API, and he/she has to switch from one
API to the other to get the things done :(

Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUQifjON2uBzUhh8RAl3SAJ4uCtbs4pElSKfbr1eOQtvSoExRhgCfb438
2aPufLx7Sthf8JSgzpf3joQ=
=6WJN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Announce] Stylus Studio 2007 Release 2 Now Available

2007-05-20 Thread Stylus Studio

[announce] Dear Apache AXIS Users,

Stylus Studio 2007 Release 2, is now available for free trial download
or online purchase. Here are some of highlights:

* Query Plan: A new query plan utility in the XQuery Editor lets you
visualize query execution plans and gain insight into how DataDirect
XQuery will execute your XQuery application, including seeing the type
of SQL statements that are used to access relational data, when XML
streaming is being used, which temporary tables are being created,
when variables are being called, etc. Query plan support is available
for any XQuery that uses the DataDirect XQuery processor.

* Support for Grouping Data Sources in XML Publisher: In Stylus Studio
2007 XML Enterprise Suite, Release 2, XML Publisher lets you create
more advanced reports through support for grouping data from nodes in
one or more data sources. Using the new Create Relationship Dialog
Box, you visually define relationships between different data sources,
or between different data islands within the same source and then add
those relationships to your XML reports using simple drag-and-drop
functionality. For more information, visit:
http://www.stylusstudio.com/videos/report-generation/xmlpublisher-070504.html

* Support for Gigabyte Size XML Files: Stylus Studio 2007 XML
Enterprise Suite, Release 2 implements new optimizations that permit
the editing of gigabyte-size XML documents.

* Bundled DataDirect XML Converters 3.0: DataDirect XML Converters are
high-performance Java and .NET components that provide bi-directional,
programmatic access to virtually any non-XML file including EDIFACT,
X12, IATA, EANCOM and flat files. For more information, visit:
http://www.xmlconverters.com

* Bundled DataDirect XQuery 3.0: DataDirect XQuery is an
implementation of XQuery that can query XML, relational data, SOAP
messages, EDI, or a combination of data sources. The latest version,
DataDirect XQuery 3.0, is bundled with Stylus Studio 2007 XML
Enterprise Suite. For more information, visit: http://www.xquery.com


Learn more about the new features at:
http://www.stylusstudio.com/xml_product_new_features.html

Download a free trial from: http://www.stylusstudio.com/xml_download.html

Sincerely,
The Stylus Studio Team
http://www.stylusstudio.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Service vs. Operation client APIs [was Re: [Axis2] SOAP header elements]

2007-05-20 Thread Eran Chinthaka
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa Abeysinghe wrote:
 OK, I really do not want to criticize the client API here, specially
 given that it has been around for more than two years.
 
 However, I have a problem when deciding whether to use the service
 client or operation client API for my implementation.
 As an example, in operation client, I do not have an API to engage a
 module but with service client I can. However if I want to access the
 SOAP envelope or play around with SOAP level stuff, I have to use
 operation client. 

See you are not getting the point here. ServiceClient is for users who
just want to send and receive some XML chunks. In ServiceClient there
are quite a number of convenient methods to do things, which are not
available. So are you suggesting to have all the methods that are in
ServiceClient to be available in OperationClient. No.
ServiceClient is for simple users and OperationClient is for more
adventurous users who wanna get some more control.

 Now I am confused as to what I should be using. How
 should I go about making my decision? If you can point me to some docs
 that would be great.

As you know we are still improving Axis2/java docs and I agree that it
is not complete. Perhaps we can learn a lot about documentation from
Axis2/C project ;)
If you are curious about engaging a module, this is how you do it.

AxisModule module = axisConfig.getModule(moduleName);
if (module != null) {
axisService.engageModule(module);
} else {
throw new AxisFault(Unable to engage module :  +
moduleName);
}

Don't think I am smart to write this code. Just copied and pasted from
ServiceClient.engageModule method. So in Axis2/Java we follow the
concept of on-demand documentation :D

Chinthaka
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUS5njON2uBzUhh8RAuzmAJ9MQBTKU/99tTKnxRixX67KOMNQiACdG3VR
b5sEmIRAz8/M+wue/ZxZzcg=
=ogQj
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]