You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Martin Gainty <mg...@hotmail.com> on 2006/07/06 22:36:27 UTC
Re: Re: Converting from Glue to Axis2.0
Folks-
Finally found a WSDL that works with WSDL2Java to generate stubs-
org.apache.axis2.wsdl.WSDL2Java -uri file://AXIS/Axis-2_1/samples/wsdl/Axis2SampleDocLit.wsdl
Still looking for more (and better) examples
Thanks
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: Martin Gainty
To: axis-user@ws.apache.org
Sent: Thursday, July 06, 2006 4:22 PM
Subject: Re: Re: Converting from Glue to Axis2.0
Good Afternoon John-
AXIS 2 is decidedly not beta ready
The functionality I had with Axis-1_3 (which worked flawlessly BTW) is either
Missing entirely..Is there one working jws which the AxisServlet will publish as a working AxisServlet service?
Doesnt work at all ..try running WSDL2Java on any WSDL in the samples folder and watch the fireworks
Last..Maven is a great tool for build engineers but I prefer Ant
Comments?
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: John Ferron
To: mgainty@hotmail.com ; axis-user@ws.apache.org
Sent: Wednesday, July 05, 2006 6:01 PM
Subject: Re: Re: Converting from Glue to Axis2.0
Yes I did and the code that you recommended to me does work, but I have to manually then create the header, evelope, and body tags for the soap message.
Some of the code that I was using was also from http://ws.apache.org/axis2/1_0/OMTutorial.html which is talked about more at the very bottom of this email.
John
>>> mgainty@hotmail.com 07/05/06 4:36 PM >>>
Hi John-
I dont know about your converter but personally I didnt see anything that resembled the V1.x code that you generated
did you get a chance to take a look at the sample 2.x client code located at
samples/googleSpellcheck/src/sample/google/spellcheck/FormModel.java
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: John Ferron
To: mgainty@hotmail.com ; axis-user@ws.apache.org
Sent: Wednesday, July 05, 2006 5:13 PM
Subject: Re: Re: Converting from Glue to Axis2.0
http://ws.apache.org/axis2/
>>> mgainty@hotmail.com 07/05/06 4:05 PM >>>
Ok - Where is Axis 2.0 located??
The latest version I can find at http://ws.apache.org/axis/ is V 1.4
Martin --
*********************************************************************
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: John Ferron
To: mgainty@hotmail.com ; axis-user@ws.apache.org
Sent: Wednesday, July 05, 2006 4:31 PM
Subject: Re: Re: Converting from Glue to Axis2.0
Martin,
The createName() method does not exist in the Axis 2.0 release, as least from what I can tell....I am using axis2.0 release 1.0
John
>>> mgainty@hotmail.com 07/05/06 3:05 PM >>>
The best way to handle this is to call the SOAPEnvelope.createNameto create a valid name and add that Child to the body-
try
{
Name name = envelope.createName("GetLastTradePrice", "WOMBAT",http://www.wombat.org/trader);
body.addChild(name);
}
catch(SOAPException excp)
{
//log the error here
}
take a look at this declaration
http://ws.apache.org/axis/java/apiDocs/javax/xml/soap/Name.html
Martin --
*********************************************************************
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: John Ferron
To: axis-user@ws.apache.org
Sent: Wednesday, July 05, 2006 3:46 PM
Subject: Fwd: Re: Converting from Glue to Axis2.0
Does anyone have an answer to the follow question??/
>>> johnferron@alliantenergy.com 07/05/06 10:31 AM >>>
Ajith,
With your sample code:
XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(file));
// create the builder
StAXOMBuilder builder = new StAXOMBuilder(parser);
// get the root element (in this case the envelope)
OMElement documentElement = builder.getDocumentElement();
SOAP11Factory factory = new SOAP11Factory();
SOAPEnvelope envelope = factory.getDefaultEnvelope();
SOAPBody body = factory.createSOAPBody(envelope);
body.addChild(documentElement);
The add child method throws a class cast exception, am I missing something?
John
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Hi,
You can just create an OMElement out of the string and attach that to
a default SOAP envelope.
1. use the staxOMBuilder to parse the file and generate an OMElement out of it.
see [1]
2. Use the SOAPxxFactory.getDefaultEnvelope() to get an envelope
object. Use the getBody().addChild(xxx) method to attach the
OMElement.
That should do the trick :)
Ajith
[1] http://ws.apache.org/axis2/1_0/OMTutorial.html
On 7/4/06, John Ferron <jo...@alliantenergy.com> wrote:
>
>
> All,
>
> I'm trying to converting a web-based publishing util from Glue to Axis 2.0
> and what I am trying to do (which I have found lacking in the samples from
> the install), is a example of how to add a standard soap header to an XML
> document. (Yes, I'm a slight newbie). What I am trying to accomplish is
> the have the operability to be able to use SOAP 1.1 or SOAP 1.2. All I'm
> trying to do is to read in a XML doc (which is done via commons-upload) and
> wrap that with a standard SOAP envelope/header. I have tried experimenting
> with the SOAP11Factory, and the SOAP12Factory, but could not get the xml
> document to load correctly in the soap document.
>
> For example (Here is the soap header I'm trying to add):
>
> <?xml version='1.0' encoding='UTF-8'?>
> <soap:Envelope
> xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
> <soap:Body>
> <myOperation
> xmlns='http://www.themindelectric.com/wsdl/virtual/'>
> <myXMLDocument>
>
>
>
> .
> </myXMLDocument>
> </myOperation>
> </soap:Body>
> </soap:Envelope>
>
> myOperation refers to a operation is a WSDL file that we will be publishing
> to. I am NOT trying to bind this to a specifc WSDL, (so I'm assuming I do
> not need to perform the whole WSDL2Java operation). If anyone could help me
> out, that would be greatly appreciated.
>
> John
--
Ajith Ranabahu
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org