Raw XML?
Hi, Given a stub that's designed to code-generated to return an ADBBean how can I query it for a copy of the raw XML? Would be handy for debugging. Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2 1.2] name of class generated from ADB keeps changing [SEC=UNCLASSIFIED]
I would also point out that the correct type probably should be PersonId in this case. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 6:10 PM To: axis-user@ws.apache.org Subject: [Axis2 1.2] name of class generated from ADB keeps changing [SEC=UNCLASSIFIED] Hi, our team is having issue with using the services generated with adb binding. We're using Axis2 1.2 at the moment. The class name that gets generated for personId element (see below) varies when axis2-wsdl2code-maven-plugin is invoked multiple times. This becomes difficult to maintain as we are not able to rely on the consistent generated class names. For the personId element we get following class names when we invoke wsdl2code in different occasions. PersonId_type4 PersonId_type12 PersonId_type20 PersonId_type28 xsd:element name=personId minOccurs=0 maxOccurs=1 xsd:annotation xsd:documentation Person ID Person ID /xsd:documentation /xsd:annotation xsd:complexType xsd:simpleContent xsd:extension base=xsd:string xsd:attribute name=literal type=xsd:string use=optional/ /xsd:extension /xsd:simpleContent /xsd:complexType /xsd:element Is it possible to fix the name of the class that gets generated in this case? Regards, Snezana Mihajlovic Java Foundation Services Applications Infrastructure and Middleware phone:(62)115900 ** IMPORTANT: This e-mail is intended for the use of the addressee and may contain information that is confidential, commercially valuable or subject to legal or parliamentary privilege. If you are not the intended recipient you are notified that any review, re-transmission, disclosure, use or dissemination of this communication is strictly prohibited by several Commonwealth Acts of Parliament. If you have received this communication in error please notify the sender immediately and delete all copies of this transmission together with any attachments. **
RE: XSD2Java
That's clever thinking Paul! It appears to solve my problem in most cases. Just to make life interesting I've been saddled with a few oddball schemas similar to the one below. The designer has embedded an XML document within another as text content. I can work out how to manually unmarshal this thing but I'm wondering if I can extend your suggestion so Axis will do this for me. Anyone know of a way to inform the code generator of this nesting? bun hotdog relish1234/relish mustardlt;SideOrders Fries=1//mustard /hotdog /bun Rich -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Saturday, June 02, 2007 2:00 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich One of the aspects of WSDL is duck-typing. http://en.wikipedia.org/wiki/Duck_typing The result of this is that you can have two different WSDLs. The official WSDL and a pseudo WSDL. So one approach would be to take the official WSDL, edit it to include the XSDs and then generate a client from it. You end up with a client that has databinding, but still talks to the real service. Paul On 6/1/07, Rich Adili [EMAIL PROTECTED] wrote: Yep, tons of them. Since writing this I've done some puttering about with various bindings and not found a good solution. The code generated by XSD2Java doesn't like my XML. The XML conforms to the schema but does not reference the schema so the generated code doesn't recognize the namespace of any of its tags. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 7:49 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich Do you have schema somewhere (i.e. just not in the WSDL)? Paul On 5/31/07, Rich Adili [EMAIL PROTECTED] wrote: Hi, My services exchange a number of XML documents that aren't code generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my best choice for generating Java bindings for these documents? Any documentation or examples lying around? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - 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] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - 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: XSD2Java
Yep, tons of them. Since writing this I've done some puttering about with various bindings and not found a good solution. The code generated by XSD2Java doesn't like my XML. The XML conforms to the schema but does not reference the schema so the generated code doesn't recognize the namespace of any of its tags. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 7:49 AM To: axis-user@ws.apache.org Subject: Re: XSD2Java Rich Do you have schema somewhere (i.e. just not in the WSDL)? Paul On 5/31/07, Rich Adili [EMAIL PROTECTED] wrote: Hi, My services exchange a number of XML documents that aren't code generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my best choice for generating Java bindings for these documents? Any documentation or examples lying around? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - 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]
XSD2Java
Hi, My services exchange a number of XML documents that aren't code generated from WSDL as the content is spec'ed as xs:any. Is XSD2Java my best choice for generating Java bindings for these documents? Any documentation or examples lying around? Thanks, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OMElement wsdl mapping
I think it's legit. anyType in this context means arbitrary XML can appear here. It's not AXIOM-specific. Rich From: LuCa [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 29, 2007 2:31 PM To: axis-user@ws.apache.org Subject: OMElement wsdl mapping Can anyone explain me, why when generating a wsdl from a java code (java2wsdl), Axis map the object type OMElement to anytype at the wsdl? Example: The method at the service java class source: public abstract OMElement getModelSolved(OMElement documentElement,String filename); The wsdl type generated: xs:element name = getModelSolved xs:complexType xs:sequence xs:element name = param0 nillable = true type = xs:anyType / xs:element name = param1 nillable = true type = xs:string / / xs:sequence / xs:complexType / xs:element It does not look like ideal for the concept of webService: One, when making a client, may not use Axis, so, how would he knows that anytype is about an Axiom type??? Thanks in advance, Luciana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: raw XML from apache axis
See http://blogs.cocoondev.org/dims/archives/004668.html From: Jaya Pattaswamy [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 10:11 AM To: axis-user@ws.apache.org Subject: raw XML from apache axis Hi, Can any one tell me on how to capture the request and response XMLs Using Apache Axis without Using TCPMon or SOAP Monitor? I want to store these request and response in a Database. Thanks and Regards, Jaya SunCom is the wireless company that's committed to doing things differently. Things we want you to know. This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This communication may contain material protected by the attorney-client privilege. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited.
RE: [SOLUTION] Example of Logging SOAP requests/responses in AXIS 1.4
You shall dance at my wedding, José!!! From: José Ferreiro [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 2:07 AM To: axis-user@ws.apache.org Subject: [SOLUTION] Example of Logging SOAP requests/responses in AXIS 1.4 Dear Rich, This will probably of your interest. I am using successfully the log method in Axis 1.4. It made it working but i didn't investigate all the options, for example where to store the log file, the log file name, etc. I was only curious to see if it could work to keep a trace of the message requests and responses! In my case it works as follows: In the client wsdd file add the following code: handler name=log type=java:org.apache.axis.handlers.LogHandler/ globalConfiguration requestFlow handler type=log/ /requestFlow responseFlow handler type=log/ /responseFlow /globalConfiguration This will create a log file by default nammed axis.log and it is in the root folder of my eclipse project when I run the web service client. Add this in deploy.wsdd It is really interesting feature because it logs the REQUEST AND THE RESPONSES. handler name=log type=java:org.apache.axis.handlers.LogHandler/ globalConfiguration requestFlow handler type=log/ /requestFlow responseFlow handler type=log/ /responseFlow /globalConfiguration the log file is nammed axis.log and in my case it is stored in !-- Logs stored in C:\tomcat5.5.12\bin\axis.log -- Those links will provide you more information: http://www.theserverside.com/discussions/thread.tss?thread_id=35765 http://www.google.com/support/adwordsapi/bin/answer.py?answer=15137 http://forum.java.sun.com/thread.jspa?threadID=724190 HOPE THIS HELPS. CHEERS Jose Ferreiro José Ferreiro 2007/5/24, Rich Adili [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : Hi dims, Thanks! That's just what I need for my product design. However, I'm also babysitting a legacy application written around an Axis1.4 beta, I forget exactly which beta. Do you know if this technique also applies to the older code? Rich -Original Message- From: Davanum Srinivas [mailto: [EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 3:06 PM To: axis-user@ws.apache.org Subject: Re: Logging SOAP requests? Rich, See http://blogs.cocoondev.org/dims/archives/004668.html thanks, dims On 5/23/07, Rich Adili [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Was thinking in terms of an option that field personnel could flip on and off. Debugging proxies are a bit arduous for such folks. I'm surprised a simple logging mechanism isn't built in. From: robert lazarski [mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Wednesday, May 23, 2007 3:01 PM To: axis-user@ws.apache.org Subject: Re: Logging SOAP requests? If you are talking about writing them to a file / db via log4j , look at the modules guide and their howto on writing a logging module: http://ws.apache.org/axis2/1_2/modules.html http://ws.apache.org/axis2/1_2/modules.html If you just want to look at it, try tcpmon or the soapmonitor. HTH, Robert On 5/23/07, Rich Adili [EMAIL PROTECTED] wrote: Hi, How does one go about logging the outgoing SOAP requests? Rich Adili -- Davanum Srinivas :: http://davanum.wordpress.com - 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] -- José Ferreiro EPFL Communication Systems engineer ing.sys.com.dipl.EPFL
xs:any stumper
Hi One of my methods takes, among other things, an xs:any bit of generic xml. Can't make heads or tails of this exception. Only clue I've found is that the exception does not fire if I create the stub using one of the ctors that does not take a ConfigurationContext; not much of a clue I suppose. The only unusual thing in my config is the .NET-style OutflowSecurity, which works fine if I'm not sending an xs:any message. I've tried commenting out the OutflowSecurity and the exception goes away. Could someone could point me in the right general direction? Rich java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at test.GUI$2$1.run(GUI.java:89) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.axis2.AxisFault: Error in extracting message properties; nested exception is: org.apache.rampart.RampartException: Error in extracting message properties at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65) at org.apache.axis2.engine.Phase.invoke(Phase.java:382) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:237) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:202) at net.xatanet.axisstubs.ConduitServiceStub.ModifyData(ConduitServiceStub.j ava:274) at net.xatanet.services.ConduitService.modifyData(ConduitService.java:102) at test.TestModifyData.invokeTest(TestModifyData.java:40) ... 6 more Caused by: org.apache.rampart.RampartException: Error in extracting message properties at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:294 ) at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56) at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59) ... 14 more Caused by: org.apache.ws.security.WSSecurityException: Error in converting SOAP Envelope to Document; nested exception is: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util. java:121) at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:146 ) ... 16 more Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1 94) at org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469) at org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476) at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util. java:107) ... 17 more Caused by: javax.xml.stream.XMLStreamException at org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper .java:952) at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:913) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1 11) ... 20 more
Wrapping an xs:any element
Hi, I tried to simplify this to keep it brief. Hope I didn't strip too much. I'm sending a message using the SOAP fragment below. The ADB bean generated by Axis2 (1.1.1) generates an ObjXmlDocument_type2 object to wrap my s:any data. I'm not clear on the exact procedure for creating this bit. I would like to have my user pass in an arbitrary OMElement which I will then insert into my ObjXmlDocument_type2 wrapper. The code below fails when I invoke the stub. Do I need something equivalent to DOM's importNode() method? ConduitServiceStub.ModifyData dataObject = new ConduitServiceStub.ModifyData(); ConduitServiceStub.ObjXmlDocument_type2 doc = new ConduitServiceStub.ObjXmlDocument_type2(); doc.setExtraElement(data); // 'data' is an OMElement created elsewhere. dataObject.setObjXmlDocument(doc); stub.myWebMethod(dataObject); s:element name=ModifyData s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=strEntityID type=s:string/ s:element minOccurs=0 maxOccurs=1 name=objXmlDocument s:complexType mixed=true s:sequence s:any/ /s:sequence /s:complexType /s:element at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:294 ) at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56) at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59) at org.apache.axis2.engine.Phase.invoke(Phase.java:382) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:237) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:202) at net.xatanet.axisstubs.ConduitServiceStub.ModifyData(ConduitServiceStub.j ava:255) at net.xatanet.services.ConduitService.modifyData(ConduitService.java:86) Rich Adili
Logging SOAP requests?
Hi, How does one go about logging the outgoing SOAP requests? Rich Adili
RE: Logging SOAP requests?
Was thinking in terms of an option that field personnel could flip on and off. Debugging proxies are a bit arduous for such folks. I'm surprised a simple logging mechanism isn't built in. From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 3:01 PM To: axis-user@ws.apache.org Subject: Re: Logging SOAP requests? If you are talking about writing them to a file / db via log4j , look at the modules guide and their howto on writing a logging module: http://ws.apache.org/axis2/1_2/modules.html If you just want to look at it, try tcpmon or the soapmonitor. HTH, Robert On 5/23/07, Rich Adili [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, How does one go about logging the outgoing SOAP requests? Rich Adili
RE: Logging SOAP requests?
Hi dims, Thanks! That's just what I need for my product design. However, I'm also babysitting a legacy application written around an Axis1.4 beta, I forget exactly which beta. Do you know if this technique also applies to the older code? Rich -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 3:06 PM To: axis-user@ws.apache.org Subject: Re: Logging SOAP requests? Rich, See http://blogs.cocoondev.org/dims/archives/004668.html thanks, dims On 5/23/07, Rich Adili [EMAIL PROTECTED] wrote: Was thinking in terms of an option that field personnel could flip on and off. Debugging proxies are a bit arduous for such folks. I'm surprised a simple logging mechanism isn't built in. From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 3:01 PM To: axis-user@ws.apache.org Subject: Re: Logging SOAP requests? If you are talking about writing them to a file / db via log4j , look at the modules guide and their howto on writing a logging module: http://ws.apache.org/axis2/1_2/modules.html If you just want to look at it, try tcpmon or the soapmonitor. HTH, Robert On 5/23/07, Rich Adili [EMAIL PROTECTED] wrote: Hi, How does one go about logging the outgoing SOAP requests? Rich Adili -- Davanum Srinivas :: http://davanum.wordpress.com - 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: Simple Qs
Client sockets are normally assigned an arbitrary port when they connect, no? I've had good luck with tools like Ethereal in snooping such things without having to instrument the application. -Original Message- From: Demetris G [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 7:45 PM To: axis-user@ws.apache.org Subject: Re: Simple Qs Glen - do you know how I can find out on which port the client stubs attempt to write to? What determines that? I am assuming the code generating tools read some kind of a configuration before they can attach a port to write out to? I am referring to the client side. Which outgoing port do the stubs choose to write on? Thanks much Glen Mazza wrote: Probably, but I really don't know much about the Axis 1.x series. Glen Am Montag, den 21.05.2007, 19:05 -0400 schrieb Demetris G: Hi Glen, thanks for the info. I am assuming the same applies for Axis 1.4? Thanks Glen Mazza wrote: Am Montag, den 21.05.2007, 17:19 -0400 schrieb Demetris G: I may be reading the overall Axis architecture a bit differently but I have these Qs if anyone can help - During a Client application call to a remote Axis engine ( SOAP call generated by the corresponding Client stubs), does an Axis engine need to be running on the client side or do the stubs contain the necessary information to generate the SOAP call and contact the remote Axis engine. The latter. The Axis2 engine is a WAR file that runs on a Servlet container. The web service is packaged as a service archive (.aar file) and is placed in the WEB-INF/services directory of the exploded WAR file. You client makes (usually) HTTP requests to access the web service, but the Axis engine is not needed for that. In other words, if I am sitting on the client side, where should I be looking at to capture the outgoing SOAP message leaving a particular application? If you wish to capture the message sent by the client, Apache TCPMon may be of help for you: http://ws.apache.org/commons/tcpmon/tcpmontutorial.html Glen - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple Qs
One of the Axis folks should verify my assumption, of course. But it's normally a simply matter to fire up a snooper and simply examine the port numbers. I use either a TCP proxy or Ethereal. The latter provides low-level, packet-by-packet output but it's a snap to set up and use and requires no application configuration. Otherwise, you modify Axis2.xml to point to your favorite debugging proxy and examine its output. http://www.ethereal.com/ -Original Message- From: Demetris G [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 7:57 PM To: axis-user@ws.apache.org Subject: Re: Simple Qs And that is what I am looking for. I need to be able to monitor the outgoing traffic from the generated (and compiled) stubs without needing to direct the application. So if the outgoing ports are assigned arbitrarily as you say then I will certainly need to snoop which ones they are and capture their traffic. Rich Adili wrote: Client sockets are normally assigned an arbitrary port when they connect, no? I've had good luck with tools like Ethereal in snooping such things without having to instrument the application. -Original Message- From: Demetris G [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 7:45 PM To: axis-user@ws.apache.org Subject: Re: Simple Qs Glen - do you know how I can find out on which port the client stubs attempt to write to? What determines that? I am assuming the code generating tools read some kind of a configuration before they can attach a port to write out to? I am referring to the client side. Which outgoing port do the stubs choose to write on? Thanks much Glen Mazza wrote: Probably, but I really don't know much about the Axis 1.x series. Glen Am Montag, den 21.05.2007, 19:05 -0400 schrieb Demetris G: Hi Glen, thanks for the info. I am assuming the same applies for Axis 1.4? Thanks Glen Mazza wrote: Am Montag, den 21.05.2007, 17:19 -0400 schrieb Demetris G: I may be reading the overall Axis architecture a bit differently but I have these Qs if anyone can help - During a Client application call to a remote Axis engine ( SOAP call generated by the corresponding Client stubs), does an Axis engine need to be running on the client side or do the stubs contain the necessary information to generate the SOAP call and contact the remote Axis engine. The latter. The Axis2 engine is a WAR file that runs on a Servlet container. The web service is packaged as a service archive (.aar file) and is placed in the WEB-INF/services directory of the exploded WAR file. You client makes (usually) HTTP requests to access the web service, but the Axis engine is not needed for that. In other words, if I am sitting on the client side, where should I be looking at to capture the outgoing SOAP message leaving a particular application? If you wish to capture the message sent by the client, Apache TCPMon may be of help for you: http://ws.apache.org/commons/tcpmon/tcpmontutorial.html Glen - 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] - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple Qs
Ethereal is a packet sniffer, not a proxy. So the output is different. A proxy provides high-level output (http message exchanges). A packet sniffer just dumps packets out. The latter can be a bit of a learning curve if you're new to such. I've not used tcpmon. Being a Windows weenie I like tools that fire up and run without need of reading manuals or posting questions on mailing lists :-). Less work that way. I think tcpmon works as a proxy so you will need to modify Axis2.xml to point to it. Either way, you don't need to know the client port # in advance. You will need to know the server URL so you can configure the proxy and/or filter out unwanted messages. Rich -Original Message- From: Demetris G [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 8:08 PM To: axis-user@ws.apache.org Subject: Re: Simple Qs Sure thing - I will take a look at Ethereal and see if it can help me. Others have also mentioned tcpmon - I am assuming that could only work if the port number is known. Right ? Cause you will need to direct the outgoing traffic through tcpmon before it can reach its destination. I think ... Rich Adili wrote: One of the Axis folks should verify my assumption, of course. But it's normally a simply matter to fire up a snooper and simply examine the port numbers. I use either a TCP proxy or Ethereal. The latter provides low-level, packet-by-packet output but it's a snap to set up and use and requires no application configuration. Otherwise, you modify Axis2.xml to point to your favorite debugging proxy and examine its output. http://www.ethereal.com/ -Original Message- From: Demetris G [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 7:57 PM To: axis-user@ws.apache.org Subject: Re: Simple Qs And that is what I am looking for. I need to be able to monitor the outgoing traffic from the generated (and compiled) stubs without needing to direct the application. So if the outgoing ports are assigned arbitrarily as you say then I will certainly need to snoop which ones they are and capture their traffic. Rich Adili wrote: Client sockets are normally assigned an arbitrary port when they connect, no? I've had good luck with tools like Ethereal in snooping such things without having to instrument the application. -Original Message- From: Demetris G [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 7:45 PM To: axis-user@ws.apache.org Subject: Re: Simple Qs Glen - do you know how I can find out on which port the client stubs attempt to write to? What determines that? I am assuming the code generating tools read some kind of a configuration before they can attach a port to write out to? I am referring to the client side. Which outgoing port do the stubs choose to write on? Thanks much Glen Mazza wrote: Probably, but I really don't know much about the Axis 1.x series. Glen Am Montag, den 21.05.2007, 19:05 -0400 schrieb Demetris G: Hi Glen, thanks for the info. I am assuming the same applies for Axis 1.4? Thanks Glen Mazza wrote: Am Montag, den 21.05.2007, 17:19 -0400 schrieb Demetris G: I may be reading the overall Axis architecture a bit differently but I have these Qs if anyone can help - During a Client application call to a remote Axis engine ( SOAP call generated by the corresponding Client stubs), does an Axis engine need to be running on the client side or do the stubs contain the necessary information to generate the SOAP call and contact the remote Axis engine. The latter. The Axis2 engine is a WAR file that runs on a Servlet container. The web service is packaged as a service archive (.aar file) and is placed in the WEB-INF/services directory of the exploded WAR file. You client makes (usually) HTTP requests to access the web service, but the Axis engine is not needed for that. In other words, if I am sitting on the client side, where should I be looking at to capture the outgoing SOAP message leaving a particular application? If you wish to capture the message sent by the client, Apache TCPMon may be of help for you: http://ws.apache.org/commons/tcpmon/tcpmontutorial.html Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: Creating a Client
I think your issue is related to the generic XML content of your Login object. From: Matthew Hannay [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 9:31 PM To: axis-user@ws.apache.org Subject: Re: Creating a Client When you use wsdltojava use the -t flag to generate a test case this should help you to see how to call the service. Matt - Original Message From: Doug Schaible [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, 22 May, 2007 12:03:00 PM Subject: Creating a Client Good Evening, I have created the attached stub file using wsdl2java. I have been reviewing the code that it created and I can not see how to actually use it. Can someone point me in the right direction? I beleive that I need to create a Login object and then pass it to the Login method, but Login does not have a constructor. The only way that I can to create a Login object is to call ServiceServiceSoapStub.Login.Factory.parse(), but I can't see how to call method with getting ServiceServiceSoapStub.Login(ServiceServiceSoapStub.Login) instead. Any help is greatly appericated. The WSDL is here: http://staging.brassring.com/SSOEnterprise/webservice/sso.asmx?WSDL Thanks, Doug Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now http://uk.answers.yahoo.com/;_ylc=X3oDMTEzaDRkZGdlBF9TAzIxMTQ3MTcxOTAEc 2VjA01haWwEc2xrA3RhZ2xpbmVz .
RE: Modularization of Axis applications?
Glen, thanks for the reply. I suppose I can work out the JAR set as suggested. I didn't mean to imply that all new apps ought to be coded in the absolute latest JDK but the first customer of my library is stuck with JDK4. I hate to burden all future designs with an old JDK because of one customer. So I'd like to be able to ship my library built around 1.4 while enabling applications built on top of it to use something newer. Can one partition a Java design so that the lower-level portion uses 1.4 while additional layers use newer technology? It seems to me that the only reliable approach would be to run my 'new' and 'old' designs in separate processes, which introduces obvious costs. Am I overlooking something? -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 9:29 AM To: axis-user@ws.apache.org Subject: Re: Modularization of Axis applications? Comments below. Am Mittwoch, den 16.05.2007, 00:59 -0500 schrieb Rich Adili: Hi, I've built my core web services library around Axis 2 using JDK1.4, from which two deployment questions have arisen. 1. My development environment references quite a few jars. How do I determine the minimum jar set? If you use Ant for your compilation/builds, you specify the precise classpath (JAR's needed) when building your app. If you are missing any JARs, compilation errors will occur. You can keep pulling out JARs and testing their use by recompiling the application each time. This will not work, however, for JARs needed by the JARs that you include in your classpath. After doing the above, you'll need to test the application and check for ClassNotFoundExceptions, and then add in the needed JARs accordingly. 1. I would now like to build applications around my library. These should be coded using JDK6 since they are new designs. That doesn't necessarily follow, no more than you should automatically upgrade your computer operating system as soon as a newer version appears. 1. How does one avoid conflicts with the support jars my library needs? There is no guarantee that every JAR will work with JDK6. If JDK6 is coded correctly, however, it should be able to use most or all of the older JARs you need without difficulty. You'll have to do a lot of testing to make sure everything works, and if not, then go to each specific mailing list of each product that fails to see if solutions are available. Glen - 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]
Modularization of Axis applications?
Hi, I've built my core web services library around Axis 2 using JDK1.4, from which two deployment questions have arisen. 1. My development environment references quite a few jars. How do I determine the minimum jar set? 2. I would now like to build applications around my library. These should be coded using JDK6 since they are new designs. How does one avoid conflicts with the support jars my library needs? Rich
Generating supporting classes
Hi, I've been working with a project that was built around Axis 1.2. The source repository contains only the Axis-generated class files, no source code. So I've had to do some guesswork. Would like to upgrade to Axis 2 but there's a bit I haven't figured out yet. This project contains a number of classes that describes segments of various XML documents that are retrieved by the Axis code. How are these classes generated? Thanks, Rich
RE: .NET passwords
I'm new to Web services so I'm learning as I bumble along. The code below signs the document correctly so that part's working. It just seems to me that passwords should never be cleartext. What does one normally do in this case, use HTTPS? -Original Message- From: Ruchith Fernando [mailto:[EMAIL PROTECTED] Sent: Sunday, March 18, 2007 11:58 PM To: axis-user@ws.apache.org Subject: Re: .NET passwords Hi, Can you please explain how the message should be secured? Do you want to sign the message with a key generated from the UsernameToken? Thanks, Ruchith On 3/14/07, Rich Adili [EMAIL PROTECTED] wrote: What is the proper way to get a client to hash a password so that a .NET server will accept it? The following produces cleartext (Axis2, v1.1.1): module ref=rampart-1.1/ parameter name=OutflowSecurity action itemsUsernameTokenSignature Timestamp/items passwordTypePasswordDigest/passwordType /action /parameter [Rich Adili] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- www.ruchith.org www.wso2.org - 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]
diffgram?
Can/will Axis2 support diffgrams? Example appears below. The 1.1.1 release throws an Unexpected subelement diffgram exception. If no support is in the works, can someone suggest a workaround? soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/03/addressing; xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec urity-utility-1.0.xsd soap:Header wsa:Action http://www.xatanet.net/XataNetWebService/xatadispatchwebservice/GetActua lDispatchPlanByTripIDResponse /wsa:Action wsa:MessageIDuuid:ad54d82c-8d3d-4215-8b55-f195b9778b2b/wsa:MessageID wsa:RelatesTouuid:1df19d43-dce4-4783-825a-8a25f671004a/wsa:RelatesTo wsa:Tohttp://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous /wsa:To wsse:Security wsu:Timestamp wsu:Id=Timestamp-131bf180-1728-4cc9-860c-f99cf52470f6 wsu:Created2007-03-18T14:05:52Z/wsu:Created wsu:Expires2007-03-18T14:10:52Z/wsu:Expires /wsu:Timestamp /wsse:Security /soap:Header soap:Body GetActualDispatchPlanByTripIDResult xmlns=http://www.xatanet.net/XataNetWebService/xatadispatchwebservice; xs:schema id=TripDataConduitDataObject xmlns= xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:msdata=urn:schemas-microsoft-com:xml-msdata xs:element name=TripDataConduitDataObject msdata:IsDataSet=true msdata:UseCurrentLocale=true xs:complexType xs:choice minOccurs=0 maxOccurs=unbounded xs:element name=Trip xs:complexType xs:attribute name=TripID msdata:ReadOnly=true msdata:AutoIncrement=true type=xs:int use=required/ xs:attribute name=CurrentRevisionNumber type=xs:int/ xs:attribute name=IsDispatch type=xs:boolean/ xs:attribute name=IsActive type=xs:boolean/ xs:attribute name=IsComplete type=xs:boolean/ xs:attribute name=IsArchived type=xs:boolean/ xs:attribute name=IsPlanValid type=xs:boolean/ xs:attribute name=IsActualValid type=xs:boolean/ xs:attribute name=XVIN type=xs:int/ xs:attribute name=OrganizationID type=xs:int/ xs:attribute name=UserDefinedRouteID type=xs:string/ xs:attribute name=UserDefinedTripID type=xs:string/ xs:attribute name=PlanStartDate type=xs:dateTime/ xs:attribute name=StartDate type=xs:dateTime/ xs:attribute name=EndDate type=xs:dateTime/ xs:attribute name=LastMessageDate type=xs:dateTime/ xs:attribute name=LastMessageType type=xs:string/ xs:attribute name=TripType type=xs:string/ xs:attribute name=LastLocation type=xs:string/ xs:attribute name=TimeVariance type=xs:int/ xs:attribute name=DateLastModified type=xs:dateTime/ xs:attribute name=DispatchCreationDate type=xs:dateTime/ xs:attribute name=DispatchLastXVIN type=xs:int/ xs:attribute name=DispatchLastStartedDate type=xs:int/ xs:attribute name=DispatchLastDriverID type=xs:int/ xs:attribute name=ArchiveDate type=xs:dateTime/ xs:attribute name=TripData type=xs:string/ xs:attribute name=UserComments type=xs:string/ xs:attribute name=XataNetUserID type=xs:int/ xs:attribute name=Reason type=xs:string/ xs:attribute name=DateOfQuery type=xs:dateTime/ /xs:complexType /xs:element /xs:choice /xs:complexType xs:unique name=TripDataConduitDataObjectKey1 msdata:PrimaryKey=true xs:selector xpath=.//Trip/ xs:field xpath=@TripID/ /xs:unique /xs:element /xs:schema diffgr:diffgram xmlns:msdata=urn:schemas-microsoft-com:xml-msdata xmlns:diffgr=urn:schemas-microsoft-com:xml-diffgram-v1 TripDataConduitDataObject xmlns= Trip diffgr:id=Trip1 msdata:rowOrder=0 TripID=62174 CurrentRevisionNumber=1 IsDispatch=true IsActive=false IsComplete=false
RE: Axis2 parsing failure
My apologies, I'm new at this. I had a look at http://issues.apache.org/jira/browse/AXIS2 and I still don't know how to submit an issue. Can someone help the dummy? -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Saturday, March 17, 2007 3:19 PM To: axis-user@ws.apache.org Subject: Re: Axis2 parsing failure Rich, jira please! -- dims On 3/16/07, Rich Adili [EMAIL PROTECTED] wrote: To debug a SOAP response failure, I copied the response to a text file and wrote this code. The SOAP message follows. This problem is a bit too deep for my shallow understanding of Axis. Any ideas why Axis can't cope with this message? java.lang.NullPointerException at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.j ava:528) at com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStrea mWriter.java:111) at com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter .java:119) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStrea mWriter.java:146) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSeri alizerUtil.java:329) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSeri alizerUtil.java:171) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:792) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:781) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:796) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:781) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:796) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:781) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:796) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE nvelopeImpl.java:179) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:781) at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:343) at org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java: 940) at java.lang.String.valueOf(String.java:2131) at java.io.PrintStream.print(PrintStream.java:462) at java.io.PrintStream.println(PrintStream.java:599) at junk.main(junk.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) import org.apache.axiom.om.OMElement; import org.apache.axiom.om.util.StAXUtils; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLStreamReader; import java.io.File; import java.io.FileInputStream; public class junk { public static void main(String[] args) { try { FileInputStream inStream = new FileInputStream(new File(src/junk.xml)); XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(inStream, utf-8); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(xmlreader, http://schemas.xmlsoap.org/soap/envelope/;); final OMElement docEl = builder.getDocumentElement(); System.err.println(docEl); } catch (Exception e) { e.printStackTrace(); } } } soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/03/addressing; xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse curity-secext-1.0.xsd xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec urity-utility-1.0.xsd soap:Header wsa:Action http://www.xatanet.net/XataNetWebService/xatadispatchwebservice/GetActua lDispatchPlanByTripIDResponse /wsa:Action wsa:MessageIDuuid:0225f814-449e-4b29-9583-66b29f68b0ba/wsa:MessageID wsa:RelatesTouuid:e5d1ad0e-e532-401c-808b-f78a4b509208/wsa:RelatesTo wsa:Tohttp://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous /wsa:To wsse:Security
Embedding XML into SOAP
I'm writing a client for a service that takes an XML document as input. I'm using WSDL2Java-generated code for my client. The generated code wants an OMElement for the XML data. This snippet attempts to supply that. Clearly, it ain't right as the send throws an exception. What am I doing wrong? public void testme(final InputStream xmlStream) throws Exception { DispatchImportServiceStub stub = new DispatchImportServiceStub(); DispatchImportServiceStub.ImportTripPlan dataObject = new DispatchImportServiceStub.ImportTripPlan(); DispatchImportServiceStub.Plan_type0 Plan = new DispatchImportServiceStub.Plan_type0(); XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(xmlStream); StAXOMBuilder builder = new StAXOMBuilder(parser); OMElement documentElement = builder.getDocumentElement(); Plan.setExtraElement(documentElement); dataObject.setPlan(Plan); stub.ImportTripPlan(dataObject); } org.apache.axis2.AxisFault: Error in extracting message properties; nested exception is: org.apache.rampart.RampartException: Error in extracting message properties at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65) at org.apache.axis2.engine.Phase.invoke(Phase.java:382) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:237) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:202) at net.xatanet.axisstubs.DispatchImportServiceStub.ImportTripPlan(DispatchI mportServiceStub.java:141) at net.xatanet.services.DispatchImportService.ImportTripPlan(DispatchImport Service.java:82) at test.TestImportTripPlan.run(TestImportTripPlan.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at test.GUI$2$1.run(GUI.java:97) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.rampart.RampartException: Error in extracting message properties at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:294 ) at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56) at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59) ... 14 more Caused by: org.apache.ws.security.WSSecurityException: Error in converting SOAP Envelope to Document; nested exception is: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util. java:121) at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:146 ) ... 16 more Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1 99) at org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469) at org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476) at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util. java:107) ... 17 more Caused by: javax.xml.stream.XMLStreamException: org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found at org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper .java:952) at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:913) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1 16) ... 20 more Caused by: org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementIm pl.java:269) at org.apache.axiom.om.impl.llom.OMNavigator._getFirstChild(OMNavigator.jav a:159) at org.apache.axiom.om.impl.llom.OMNavigator.updateNextNode(OMNavigator.jav a:128) at org.apache.axiom.om.impl.llom.OMNavigator.next(OMNavigator.java:109) at org.apache.axiom.om.impl.llom.OMStAXWrapper.updateNextNode(OMStAXWrapper .java:961) at org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper .java:950) ... 22 more
RE: Embedding XML into SOAP
Thanks for the suggestions, Paul. I tried the nodatabinding approach and it got me past my original problem. Unfortunately, both suggested approaches return an OMElement and I have 48 web methods to implement. I'm not keen on writing that much unwrapping code. So, can someone tell me what I did wrong in the first place? -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 8:57 AM To: axis-user@ws.apache.org Subject: Re: Embedding XML into SOAP Rich Is the XML the whole of the SOAP body? Because its much simpler to use the ServiceClient API which takes an OMElement directly. ServiceClient sc = new ServiceClient(url); // if the service needs an action: sc.getOptions().setAction(http://whatever;); OMElement response = sc.sendReceive(omElement); The other option is to generate the stub using the nodatabinding approach which will mean you don't have all those classes. Try wsdl2java -d none Paul On 3/16/07, Rich Adili [EMAIL PROTECTED] wrote: I'm writing a client for a service that takes an XML document as input. I'm using WSDL2Java-generated code for my client. The generated code wants an OMElement for the XML data. This snippet attempts to supply that. Clearly, it ain't right as the send throws an exception. What am I doing wrong? public void testme(final InputStream xmlStream) throws Exception { DispatchImportServiceStub stub = new DispatchImportServiceStub(); DispatchImportServiceStub.ImportTripPlan dataObject = new DispatchImportServiceStub.ImportTripPlan(); DispatchImportServiceStub.Plan_type0 Plan = new DispatchImportServiceStub.Plan_type0(); XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(xmlStream); StAXOMBuilder builder = new StAXOMBuilder(parser); OMElement documentElement = builder.getDocumentElement(); Plan.setExtraElement(documentElement); dataObject.setPlan(Plan); stub.ImportTripPlan(dataObject); } org.apache.axis2.AxisFault: Error in extracting message properties; nested exception is: org.apache.rampart.RampartException: Error in extracting message properties at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65) at org.apache.axis2.engine.Phase.invoke(Phase.java:382) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:237) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:202) at net.xatanet.axisstubs.DispatchImportServiceStub.ImportTripPlan(DispatchI mportServiceStub.java:141) at net.xatanet.services.DispatchImportService.ImportTripPlan(DispatchImport Service.java:82) at test.TestImportTripPlan.run(TestImportTripPlan.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at test.GUI$2$1.run(GUI.java:97) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.rampart.RampartException: Error in extracting message properties at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:294 ) at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56) at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59) ... 14 more Caused by: org.apache.ws.security.WSSecurityException: Error in converting SOAP Envelope to Document; nested exception is: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util. java:121) at org.apache.rampart.RampartMessageData.init(RampartMessageData.java:146 ) ... 16 more Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1 99) at org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469) at org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476) at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util. java:107
RE: Embedding XML into SOAP
OKEEDOKEE. ?xml version=1.0 encoding=utf-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://www.xatanet.net/XataNetWebService/DispatchImportServic e xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; targetNamespace=http://www.xatanet.net/XataNetWebService/DispatchImport Service xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; wsdl:types s:schema elementFormDefault=qualified targetNamespace=http://www.xatanet.net/XataNetWebService/DispatchImport Service s:element name=ImportTripPlan s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=plan s:complexType mixed=true s:sequence s:any / /s:sequence /s:complexType /s:element /s:sequence /s:complexType /s:element s:element name=ImportTripPlanResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=ImportTripPlanResult type=s:string / /s:sequence /s:complexType /s:element /s:schema /wsdl:types wsdl:message name=ImportTripPlanSoapIn wsdl:part name=parameters element=tns:ImportTripPlan / /wsdl:message wsdl:message name=ImportTripPlanSoapOut wsdl:part name=parameters element=tns:ImportTripPlanResponse / /wsdl:message wsdl:portType name=DispatchImportServiceSoap wsdl:operation name=ImportTripPlan wsdl:documentation xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;Adds a single trip plan to the XataNet system. lt;BRgt;The input parameter, plan, must be an XmlDocument conforming to the XataNet lt;a href=/XataNetWebService/MessageSchemas/SchemaDocumentation/TripPlan/Trip Plan.htmlgt;TripPlan.xsdlt;/agt;lt;BRgt;/wsdl:documentation wsdl:input message=tns:ImportTripPlanSoapIn / wsdl:output message=tns:ImportTripPlanSoapOut / /wsdl:operation /wsdl:portType wsdl:binding name=DispatchImportServiceSoap type=tns:DispatchImportServiceSoap soap:binding transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=ImportTripPlan soap:operation soapAction=http://www.xatanet.net/XataNetWebService/DispatchImportServi ce/ImportTripPlan style=document / wsdl:input soap:body use=literal / /wsdl:input wsdl:output soap:body use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:binding name=DispatchImportServiceSoap12 type=tns:DispatchImportServiceSoap soap12:binding transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=ImportTripPlan soap12:operation soapAction=http://www.xatanet.net/XataNetWebService/DispatchImportServi ce/ImportTripPlan style=document / wsdl:input soap12:body use=literal / /wsdl:input wsdl:output soap12:body use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=DispatchImportService wsdl:port name=DispatchImportServiceSoap binding=tns:DispatchImportServiceSoap soap:address location=http://alpha.xata.com/xatanetwebservice/DispatchImportService. asmx / /wsdl:port wsdl:port name=DispatchImportServiceSoap12 binding=tns:DispatchImportServiceSoap12 soap12:address location=http://alpha.xata.com/xatanetwebservice/DispatchImportService. asmx / /wsdl:port /wsdl:service /wsdl:definitions -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 11:38 AM To: axis-user@ws.apache.org Subject: Re: Embedding XML into SOAP Rich Can you let us see the WSDL? I don't understand the usecase. Paul On 3/16/07, Rich Adili [EMAIL PROTECTED] wrote: Thanks for the suggestions, Paul. I tried the nodatabinding approach and it got me past my original problem. Unfortunately, both suggested approaches return an OMElement and I have 48 web methods to implement. I'm not keen on writing that much unwrapping code. So, can someone tell me what I did wrong in the first place? -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 8:57 AM To: axis-user@ws.apache.org Subject: Re: Embedding XML into SOAP Rich Is the XML the whole of the SOAP body? Because its much simpler to use the ServiceClient API which takes an OMElement directly. ServiceClient sc = new ServiceClient(url); // if the service needs an action: sc.getOptions().setAction(http://whatever;); OMElement response = sc.sendReceive(omElement); The other option is to generate the stub using the nodatabinding approach which will mean you don't have all those classes. Try wsdl2java -d none Paul On 3/16/07, Rich Adili [EMAIL PROTECTED] wrote
SOAP 1.1
Howdy, What does it take to get Axis2 1.1.1 to emit SOAP11 code? Is it as simple as changing the option to SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI? (Tried this and the .NET server wasn't too happy). Rich
SOAP Monitor
Hi, I'm using Axis2, v1.1.1, client-side only. Talking to a .NET server. Looks like I can't use soapmonitor in this configuration. Any clever ideas? Thx, Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.NET passwords
What is the proper way to get a client to hash a password so that a .NET server will accept it? The following produces cleartext (Axis2, v1.1.1): module ref=rampart-1.1/ parameter name=OutflowSecurity action itemsUsernameTokenSignature Timestamp/items passwordTypePasswordDigest/passwordType /action /parameter [Rich Adili] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Another newbie question
I've been learning to use Axis 2, v1.1.1 to generate client-only code (ADB option). Seems straightforward enough if my request parameters are simple, but it gets a bit messy as the complexity goes up. For example, if I wish to pass an array as an argument it seems that I must: 1. Generate the array (let's call it CustomerSite[]). 2. Wrap that in something called SiteImportDataObject (inner class within Axis). 3. Wrap that within something called CustomerSites (another inner class). 4. Bake on low heat and serve it to my service stub for transmission. Seems a bit more complex than it ought to be. Am I doing it wrong? Rich Adili
Newbie Question re: Axis2 1.1.1
OK, I'm a first-timer at Web Services, so be gentle, please. I'm exporting a function like String HelloWorld (int whatever, Date whenever); Seems like my user needs to do something like: Service1Stub client = new Service1Stub(ctx, http://whereever;); HelloWord hw = new HelloWorld(123, new Date()); Result = client.HelloWorld(hw).getHelloWorldResult(); Is it not possible to get Axis2 to do all that busy work of marshalling and un-marshalling? Or am I being a dope and overlooking something? Thanks, Rich