Problems deploying Axis version 1.5
Title: Problems deploying Axis version 1.5 Hi all, For the past two days, I have been trying to deploy Axis C++ on my workstation. The configuration is as follows: Windows XP SP2, Apache 1.3.33, Xerces 2.6 and Axis 1.5 (final version). I followed the Windows Installation Guide to the letter, adding all the necessary DLL's to the [Axis_Folder]/lib folder, amending the PATH variable to reflect the filesystem location and adding the AXISCPP_DEPLOY variable. I also added the LoadModule lines to the httpd.conf file. In the end, when I try to start Apache using the command apache -k start, I get the following message: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Note the errors or messages above, and press the ESC key to exit. Please help me figure this out. Thanks, Srdjan Pejic Software Development Intern Environment Canada Phone: (416) 739-5740 E-Mail: Srdjan.Pejic AT ec.gc.ca
RE: Problems deploying Axis version 1.5
Title: Problems deploying Axis version 1.5 Do you have the Xerces DLL on your path? If you are using the binary distribution of Axis C++ 1.5, then you need Xerces 2.2.0, and not Xerces 2.6. Thanks, Samisa -Original Message- From: Pejic,Srdjan [Ontario] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 11:00 PM To: axis-c-user@ws.apache.org Subject: Problems deploying Axis version 1.5 Hi all, For the past two days, I have been trying to deploy Axis C++ on my workstation. The configuration is as follows: Windows XP SP2, Apache 1.3.33, Xerces 2.6 and Axis 1.5 (final version). I followed the Windows Installation Guide to the letter, adding all the necessary DLL's to the [Axis_Folder]/lib folder, amending the PATH variable to reflect the filesystem location and adding the AXISCPP_DEPLOY variable. I also added the LoadModule lines to the httpd.conf file. In the end, when I try to start Apache using the command apache -k start, I get the following message: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Note the errors or messages above, and press the ESC key to exit. Please help me figure this out. Thanks, Srdjan Pejic Software Development Intern Environment Canada Phone: (416) 739-5740 E-Mail: Srdjan.Pejic AT ec.gc.ca
RE: communication between the Handler and the Service
Jeff, I haven't gone through the entire discussion, but the problem might be linked to http://issues.apache.org/jira/browse/AXIS-1469 See if it helps. Thanks, Ashutosh -Original Message- From: Jeff Saremi [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 8:47 PM To: axis-user@ws.apache.org Subject: Re: communication between the Handler and the Service It did not make any difference. or I don't how when and where to call it. I called saveChanges() after the modifications to the body but the Service still printed the old body xml. jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: I think I used that one too. But let me give it another try and get back to you. jeff --- Jeff Greif [EMAIL PROTECTED] wrote: Have you noticed the method saveChanges on SOAPMessage? Jeff Jeff Saremi wrote: So i played more with this and here's what i found out: - In the handler, the changes to the message, envelope and body will all get saved and passed to the Service afterwards - Any chnages to the nodes inside the body are allowed to be made and displayed while in the handler but beyond that none of those changes make it! ** some where in the handler ** public void invoke(MessageContext context) { ... Node someNode = body.getElementsByTagName(MyNodeName).item(0); someNode.appendChild( body.getOwnerDocument().createTextNode(someTextForMyNode)); // print the body now // the oputput will include the new text node System.out.println(XMLUtils.ElementToString(body)); // out of desperation you can do the following // which should not be needed // but they won't help you with the new Node // being added to the body and hence being passed // to your Service down the chain envelope.removeBody(); envelope.setBody(body); Message newMessage = new Message(envelope); messageContext.setRequestMessage(newMessage); } ** some time later inside the Service ** public Element[] service(Element[] elements) { for (int i = 0; i elements.length; i++) { // print the elements to your hearts content // you will not see any traces of the textnode // you added in your handler // all you see is the original elements System.out.println( XMLUtils.ElementToString(elements[i])); } return elements; } jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: I should have explained more about what i'm doing. I don't know where this processRequest() method is. It looks like there are two or more Handler concepts within Axis. The Handler that i'm talking about are the ones you specify in the requestFlow or responseFlow chains: service name=MyService style=message parameter name=className value=MyService / parameter name=allowedMethods value=service / requestFlow handler type=java:MyHandler/ /requestFlow /service Here's the method that MyHandler overrides. The code below is just to point out the problem -- this is not how i'm planning on writing my final code: public class WARPHandler extends BasicHandler { public void invoke(MessageContext context) throws AxisFault { try { Message message = context.getRequestMessage(); SOAPEnvelope envelope = message.getSOAPEnvelope(); SOAPBody body = envelope.getBody(); // do some modification to the elements in the body // ... System.out.println( Is Body referenced? + (body == context.getMessage().getSOAPBody())); MyService.bodyElementInHandler = body.getFirstChild(); } catch (Exception e) { e.printStackTrace(); AxisFault.makeFault(e); } } } And the Service gets the Body document or elements or the SOAPEnvelope after the Handler is done with it: public class MyService { public static Object bodyElementInHandler; public Document service(Document bodyElement) { // the bodyElement here has none of the changes // that were made to it in the Handler! System.out.println( bodies are not the same: + (bodyElementInHandler == bodyElement)); return bodyElement; } } In the invoke() method of the Handler i tried to show that the Body that I got is not a copy of what is in the Message and ultimately in the MessageContext. It is just a refernce to it. Therefore modifications to this Body or its subelements need not be set again in the Message. However, regardless of it being a copy or a reference I also set the CurrentMessage of MessageContext to a new Message (i have not shown this part of the code here). Then I set a static variable in my Service just for the sake of comparison. In the service() method of MyService I compare the passed document to the reference set by the Handler. These two objects, even though
Re: SOAP Body and Header response
Thanks for your answer! You are refering to a Context. What is this context? I have build the --server-side of the service WSDL and I don't have any reference to a contaxt in the impl class. Please help. Sorry, but I'm now to AXIS. Br, Alecs On Mon, 2005-04-25 at 10:22 -0400, [EMAIL PROTECTED] wrote: Alecs, If I understand you're question correctly, the following code should help. Service Side: String someResponse = some response; // Get Response Envelope SOAPEnvelope responseEnv = ctx.getResponseMessage().getSOAPEnvelope(); // Create Bean ResponseHeader responseHeader = new ResponseHeader(); responseHeader.setValue1(Value1); responseHeader.setValue2(Value2); ... // Create SOAP Header Element SOAPHeaderElement responseHeaderElement = new SOAPHeaderElement(http://www.somedomainname.com;, ResponseHeader, responseHeader); or SOAPHeaderElement responseHeaderElement = new SOAPHeaderElement(http://www.somedomainname.com;, ResponseHeader); responseHeaderElement.setObjectValue(responseHeader); // Add header to response envelope responseEnv.addHeader(responseRoutingElement); return response; Client Side is similar: // After the invoke //Get the response envelope SOAPEnvelope returnEnv = call.getMessageContext().getResponseMessage().getSOAPEnvelope(); //Get the header with the same names that you put it into the SOAP with. SOAPHeaderElement responseHeaderElement = returnEnv.getHeaderByName(http://www.somedomainname.com,ResponseHeader;); //Grab the object out of the header element. responseHeader = null; if(responseHeaderElement != null) { // Get the bean from the SOAP... responseHeader = (ResponseHeader) responseHeaderElement.getObjectValue(); // Do whatever you need to do. } else { // Trouble System.out.println(headerElement = null); } You need to make sure you have your bean serialization/deserialization set-up correctly on both ends. The response will be in the return value from the invoke... Mark A. Malinoski AES/PHEAA Technical Coordinator/Web Development 717-720-2413 [EMAIL PROTECTED] Alecsandru Chirosca alecsandru.chiro To [EMAIL PROTECTED]axis-user@ws.apache.org cc 04/25/2005 09:48 AMSubject SOAP Body and Header response Please respond to [EMAIL PROTECTED] he.org Hi, Please help me wth this one I tryed and googled a lot in the last 10 days without any result. I need to return a SOAP response that is containing informations in both SOAP header and SOAP body. I have the beans that correctly serialize to the elements in header and boby but I cannot put them togheter. Please point me in the right direction here... BR, Alecs
MessageContext - SOAP headers
Hello Please can someone help me as I am really stuck and confused I have some server-side code that passes parameters to a back-end db table. If OK, I return a string value I want to write a AXIS SOAP handler that will do the following : 1. Take the string value and pass it to a client - the client will create a SOAP header and store the vlaue in it 2. I want to be able to get the SOAP header value from the client, to check the value, if it exists, and if needed update the SOAP header value. To get the SOAP header vlaue in the client, do i use MessageContext? So the string returned by the 'server-side' is used by the client in it's fruther communication as a proof of authenticated client _ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk
Re: SOAP Body and Header response
Thanks a lot! Thanks for your response. BR, Alecs On Tue, 2005-04-26 at 10:11 +0300, Alecsandru Chirosca wrote: Thanks for your answer! You are refering to a Context. What is this context? I have build the --server-side of the service WSDL and I don't have any reference to a contaxt in the impl class. Please help. Sorry, but I'm now to AXIS. Br, Alecs On Mon, 2005-04-25 at 10:22 -0400, [EMAIL PROTECTED] wrote: Alecs, If I understand you're question correctly, the following code should help. Service Side: String someResponse = some response; // Get Response Envelope SOAPEnvelope responseEnv = ctx.getResponseMessage().getSOAPEnvelope(); // Create Bean ResponseHeader responseHeader = new ResponseHeader(); responseHeader.setValue1(Value1); responseHeader.setValue2(Value2); ... // Create SOAP Header Element SOAPHeaderElement responseHeaderElement = new SOAPHeaderElement(http://www.somedomainname.com;, ResponseHeader, responseHeader); or SOAPHeaderElement responseHeaderElement = new SOAPHeaderElement(http://www.somedomainname.com;, ResponseHeader); responseHeaderElement.setObjectValue(responseHeader); // Add header to response envelope responseEnv.addHeader(responseRoutingElement); return response; Client Side is similar: // After the invoke //Get the response envelope SOAPEnvelope returnEnv = call.getMessageContext().getResponseMessage().getSOAPEnvelope(); //Get the header with the same names that you put it into the SOAP with. SOAPHeaderElement responseHeaderElement = returnEnv.getHeaderByName(http://www.somedomainname.com,ResponseHeader;); //Grab the object out of the header element. responseHeader = null; if(responseHeaderElement != null) { // Get the bean from the SOAP... responseHeader = (ResponseHeader) responseHeaderElement.getObjectValue(); // Do whatever you need to do. } else { // Trouble System.out.println(headerElement = null); } You need to make sure you have your bean serialization/deserialization set-up correctly on both ends. The response will be in the return value from the invoke... Mark A. Malinoski AES/PHEAA Technical Coordinator/Web Development 717-720-2413 [EMAIL PROTECTED] Alecsandru Chirosca alecsandru.chiro To [EMAIL PROTECTED]axis-user@ws.apache.org cc 04/25/2005 09:48 AMSubject SOAP Body and Header response Please respond to [EMAIL PROTECTED] he.org Hi, Please help me wth this one I tryed and googled a lot in the last 10 days without any result. I need to return a SOAP response that is containing informations in both SOAP header and SOAP body. I have the beans that correctly serialize to the elements in header and boby but I cannot put them togheter. Please point me in the right direction here... BR, Alecs
AW: MessageContext - SOAP headers
The invoke(MessageContext context) of the Handler (every handler needs invoke()) gets the MessageContext Then make the following: Message msg = context.getRequestMessage(); SOAPEnvelope env = msg.getSOAPEnvelope(); SOAPHeaderElement header = env.getHeaderByName(http://xml.apache.org/axis/session;, sessionID); Tomi -Ursprüngliche Nachricht- Von: Plorks mail [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 26. April 2005 11:11 An: axis-user@ws.apache.org Betreff: MessageContext - SOAP headers Hello Please can someone help me as I am really stuck and confused I have some server-side code that passes parameters to a back-end db table. If OK, I return a string value I want to write a AXIS SOAP handler that will do the following : 1. Take the string value and pass it to a client - the client will create a SOAP header and store the vlaue in it 2. I want to be able to get the SOAP header value from the client, to check the value, if it exists, and if needed update the SOAP header value. To get the SOAP header vlaue in the client, do i use MessageContext? So the string returned by the 'server-side' is used by the client in it's fruther communication as a proof of authenticated client _ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk
Exception in thread main java.lang.NoClassDefFoundError
Hello I am following the Axis installation instrunction from here http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices I get to step 6 set my classpath then i try to run the admin client using this java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd But i get this error - Exception in thread main java.lang.NoClassDefFoundError: Files\AXIS\axis-1_1\lib\axis/jar checked my classpath and it looks correct C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program Files\AXIS\axis-1_1\lib\saaj.jar; C:\Program Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program Files\AXIS\axis-1_1\lib\activation.jar Can anybody help _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk
RE: AW: MessageContext - SOAP headers
Hello Ive got this so far public class SOAPHandler extends HTTPSender { public void invoke(MessageContext msgContext) throws AxisFault { handleRequest(msgContext); super.invoke(msgContext); } public boolean handleRequest(MessageContext context) { try { Message message = context.getRequestMessage(); SOAPEnvelope envelope = message.getSOAPEnvelope(); SOAPHeaderElement header = envelope.getHeaderByName(http://addressinhere,TokenHeader;); } catch(Exception e) { System.out.println(e); } return true; I know i need a handleResponse - will that be similar to handleRequest? Can you tell me what MessageContext is? I'm new to Axis Thanks for any help From: Dorner, Thomas [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: AW: MessageContext - SOAP headers Date: Tue, 26 Apr 2005 12:16:28 +0200 The invoke(MessageContext context) of the Handler (every handler needs invoke()) gets the MessageContext Then make the following: Message msg = context.getRequestMessage(); SOAPEnvelope env = msg.getSOAPEnvelope(); SOAPHeaderElement header = env.getHeaderByName(http://xml.apache.org/axis/session;, sessionID); Tomi -Ursprüngliche Nachricht- Von: Plorks mail [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 26. April 2005 11:11 An: axis-user@ws.apache.org Betreff: MessageContext - SOAP headers Hello Please can someone help me as I am really stuck and confused I have some server-side code that passes parameters to a back-end db table. If OK, I return a string value I want to write a AXIS SOAP handler that will do the following : 1. Take the string value and pass it to a client - the client will create a SOAP header and store the vlaue in it 2. I want to be able to get the SOAP header value from the client, to check the value, if it exists, and if needed update the SOAP header value. To get the SOAP header vlaue in the client, do i use MessageContext? So the string returned by the 'server-side' is used by the client in it's fruther communication as a proof of authenticated client _ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/
Serialization of gif image
Hi, I've got a service defined that is transferring an java.awt.Image using SOAP with attachments. Here is the WSDL: wsdl:definitions name=ImageryService targetNamespace=http://examples.com/ImageService; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:types=http://examples.com/ImageService/types; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://examples.com/ImageService; wsdl:types !-- types namespace for this service -- xsd:schema targetNamespace=http://examples.com/ImageService/types; xmlns:types=http://examples.com/ImageService/types; !-- Wrapper elements to provide unique signatures for the operations -- xsd:element name=addImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=replaceImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=getImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=ImageInfo xsd:complexType xsd:sequence xsd:element name=name type=xsd:string/ xsd:element name=id type=xsd:int/ xsd:element name=lat type=xsd:double/ xsd:element name=lon type=xsd:double/ xsd:element name=time type=xsd:dateTime/ /xsd:sequence /xsd:complexType /xsd:element !-- Status return for the operations. -- xsd:element name=status type=xsd:string / /xsd:schema /wsdl:types !-- Input for the operations. -- wsdl:message name=addImageRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:addImage/ !-- second part is the attachment -- wsdl:part name=image type=xsd:base64Binary/ /wsdl:message wsdl:message name=addImageResponse wsdl:part name=body element=types:status/ /wsdl:message wsdl:message name=getImageRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:getImage/ /wsdl:message wsdl:message name=getImageResponse wsdl:part name=status element=types:status/ !-- second part is the attachment -- wsdl:part name=image type=xsd:base64Binary/ /wsdl:message wsdl:message name=replaceImageRequest wsdl:part name=body element=types:replaceImage/ wsdl:part name=newImage type=xsd:base64Binary/ /wsdl:message wsdl:message name=replaceImageResponse wsdl:part name=status element=types:status/ /wsdl:message wsdl:portType name=ImageryServicePortType wsdl:operation name=addImage wsdl:input message=tns:addImageRequest/ wsdl:output message=tns:addImageResponse/ /wsdl:operation wsdl:operation name=getImage wsdl:input message=tns:getImageRequest/ wsdl:output message=tns:getImageResponse/ /wsdl:operation wsdl:operation name=replaceImage wsdl:input message=tns:replaceImageRequest/ wsdl:output message=tns:replaceImageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=ImageryServiceBinding type=tns:ImageryServicePortType soap:binding style=wrapped transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=addImage soap:operation soapAction=addImage/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=image type=image/gif/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation wsdl:operation name=getImage soap:operation soapAction=getImage/ wsdl:input soap:body parts=body use=literal/ /wsdl:input wsdl:output mime:multipartRelated mime:part soap:body parts=status use=literal/ /mime:part mime:part mime:content part=image type=image/gif/ /mime:part /mime:multipartRelated /wsdl:output /wsdl:operation wsdl:operation name=replaceImage soap:operation soapAction=replaceImage/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=newImage type=image/gif/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=ImageryService wsdl:port name=ImageryService binding=tns:ImageryServiceBinding soap:address location=http://192.168.1.1:8080/axis/services/ImageryService/ /wsdl:port /wsdl:service /wsdl:definitions It worked fine when the Image was of type image/jpeg (the wsdl defined the type as image/jpeg), but now that I am trying to send a gif image, I see that the client is still setting the Content-Type in the mime attachment to image/jpeg. From what I can see from stepping through the org.apache.axis.encoding.ser.ImageDataHandlerSerialize.serialize() method, when the Data Handler is created the content type for the ImageDataSource() object is not specified and so it defaults to image/jpeg. Have I missed something that will allow support for gif (or other content-types)? regards Karl
RE: Example Wrapped/Literal WSDD file anyone ?
TImothy, Here is one that I have used: !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from ImageryService WSDL service -- service name=ImageryService provider=java:RPC style=wrapped use=literal parameter name=wsdlTargetNamespace value=http://examples.com/ImageService/ parameter name=wsdlServiceElement value=ImageryService/ parameter name=wsdlServicePort value=ImageryService/ parameter name=sendMultiRefs value=false/ parameter name=className value=com.examples.ImageService.ImageryServiceBindingSkeleton/ parameter name=wsdlPortType value=ImageryServicePortType/ parameter name=typeMappingVersion value=1.2/ parameter name=allowedMethods value=*/ typeMapping xmlns:ns=http://examples.com/ImageService; qname=ns:DataHandler type=java:javax.activation.DataHandler serializer=org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory deserializer=org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://examples.com/ImageService/types; qname=ns:ImageInfo type=java:com.examples.ImageService.types.ImageInfo serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://examples.com/ImageService/types; qname=ns:getImage type=java:com.examples.ImageService.types.GetImage serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://examples.com/ImageService/types; qname=ns:replaceImage type=java:com.examples.ImageService.types.ReplaceImage serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://examples.com/ImageService/types; qname=ns:addImage type=java:com.examples.ImageService.types.AddImage serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / /service /deployment I am fairly new to this but it looks like yours is missing the attribute : provider=java:RPC regards Karl Schwarz -Original Message- From: Timothy Thorpe [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 7:03 AM To: axis-user@ws.apache.org Subject: Example Wrapped/Literal WSDD file anyone ? Hello There Does anyone have an example 'deploy.wsdd' file that deploys their AXIS web service as 'wrapped/literal' that they could send me ? I have an RPC/Encoded web service that I want to convert to Wrapped/Literal but am struggling to get the WSDD right (it is attached) - the web service deployed using this WSDD seems to still be accepting only RPC/Encoded requests. Many Thanks, Timothy Thorpe Consultant Software Engineer
Re: BPELJ
Hi Sandeep, There's an open source implementation of the WS-BPEL standard named Twister. You can find more about it here: http://www.smartcomps.org/twister We're currently merging Twister with the Apache Incubator project Agila (source is being moved to Agila's repository, documentation will follow) so if you want more information I'd advise subscribing to [EMAIL PROTECTED] and checking current Twister site. Twister-becoming-Agila-BPEL is not a BPELJ implementation though but AFAIK BPELJ is just a proposal made by BEA and IBM and not a standard (it's actually kind of breaking the WS-BPEL standard). I'd advise sticking with BPEL as BPELJ has very little added value. Cheers, Matthieu Riou.
Re: Serialization of gif image
Please create a bug report. thanks, dims On 4/26/05, Schwarz, Karl [EMAIL PROTECTED] wrote: Hi, I've got a service defined that is transferring an java.awt.Image using SOAP with attachments. Here is the WSDL: wsdl:definitions name=ImageryService targetNamespace=http://examples.com/ImageService; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:types=http://examples.com/ImageService/types; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://examples.com/ImageService; wsdl:types !-- types namespace for this service -- xsd:schema targetNamespace=http://examples.com/ImageService/types; xmlns:types=http://examples.com/ImageService/types; !-- Wrapper elements to provide unique signatures for the operations -- xsd:element name=addImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=replaceImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=getImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=ImageInfo xsd:complexType xsd:sequence xsd:element name=name type=xsd:string/ xsd:element name=id type=xsd:int/ xsd:element name=lat type=xsd:double/ xsd:element name=lon type=xsd:double/ xsd:element name=time type=xsd:dateTime/ /xsd:sequence /xsd:complexType /xsd:element !-- Status return for the operations. -- xsd:element name=status type=xsd:string / /xsd:schema /wsdl:types !-- Input for the operations. -- wsdl:message name=addImageRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:addImage/ !-- second part is the attachment -- wsdl:part name=image type=xsd:base64Binary/ /wsdl:message wsdl:message name=addImageResponse wsdl:part name=body element=types:status/ /wsdl:message wsdl:message name=getImageRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:getImage/ /wsdl:message wsdl:message name=getImageResponse wsdl:part name=status element=types:status/ !-- second part is the attachment -- wsdl:part name=image type=xsd:base64Binary/ /wsdl:message wsdl:message name=replaceImageRequest wsdl:part name=body element=types:replaceImage/ wsdl:part name=newImage type=xsd:base64Binary/ /wsdl:message wsdl:message name=replaceImageResponse wsdl:part name=status element=types:status/ /wsdl:message wsdl:portType name=ImageryServicePortType wsdl:operation name=addImage wsdl:input message=tns:addImageRequest/ wsdl:output message=tns:addImageResponse/ /wsdl:operation wsdl:operation name=getImage wsdl:input message=tns:getImageRequest/ wsdl:output message=tns:getImageResponse/ /wsdl:operation wsdl:operation name=replaceImage wsdl:input message=tns:replaceImageRequest/ wsdl:output message=tns:replaceImageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=ImageryServiceBinding type=tns:ImageryServicePortType soap:binding style=wrapped transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=addImage soap:operation soapAction=addImage/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=image type=image/gif/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation wsdl:operation name=getImage soap:operation soapAction=getImage/ wsdl:input soap:body parts=body use=literal/ /wsdl:input wsdl:output mime:multipartRelated mime:part soap:body parts=status use=literal/ /mime:part mime:part mime:content part=image type=image/gif/ /mime:part /mime:multipartRelated /wsdl:output /wsdl:operation wsdl:operation name=replaceImage soap:operation soapAction=replaceImage/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=newImage type=image/gif/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=ImageryService wsdl:port name=ImageryService binding=tns:ImageryServiceBinding soap:address location=http://192.168.1.1:8080/axis/services/ImageryService/ /wsdl:port /wsdl:service /wsdl:definitions It worked fine when the Image was of type image/jpeg (the wsdl defined the type as image/jpeg), but now that I am trying to send a gif image, I see that the client is still setting the Content-Type in the mime attachment to image/jpeg. From what I can see from stepping through the org.apache.axis.encoding.ser.ImageDataHandlerSerialize.serialize() method, when the Data Handler is created the content type for the ImageDataSource() object is not specified and so it defaults to image/jpeg. Have I missed something
RE: Exception in thread main java.lang.NoClassDefFoundError
Looks like you need to put quotes around the specification of classpath. java -cp %AXISCLASSPATH% ... -Original Message- From: Plorks mail [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 6:18 AM To: axis-user@ws.apache.org Subject: Exception in thread main java.lang.NoClassDefFoundError Hello I am following the Axis installation instrunction from here http://ws.apache.org/axis/java/install.html#Step5InstallingNew WebServices I get to step 6 set my classpath then i try to run the admin client using this java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd But i get this error - Exception in thread main java.lang.NoClassDefFoundError: Files\AXIS\axis-1_1\lib\axis/jar checked my classpath and it looks correct C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program Files\AXIS\axis-1_1\lib\saaj.jar; C:\Program Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program Files\AXIS\axis-1_1\lib\activation.jar Can anybody help _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk
RE: Exception parsing complex data type
Got it to work...seems that the deploy.wsdd file created by Eclipse/WST didn't set style attribute to wrapped. When I set it manually, all is well. Please note the last wsdl I provided didn't have the style set to wrapped, but it was with the copy I was using. Sorry for the confusion Ann, thanks for all your help Karl -Original Message- From: Schwarz, Karl [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 7:53 AM To: axis-user@ws.apache.org Subject: RE: Exception parsing complex data type Well I've tried a few different tracks and I am still left with the same original problem, that is an org.xml.sax.SAXException: Invalid element exception The wsdl I am using is a follows: wsdl:definitions name=PhotoCatalogService targetNamespace=http://examples.com/PhotoCatalog; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:types=http://examples.com/PhotoCatalog/types; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://examples.com/PhotoCatalog; wsdl:types xsd:schema targetNamespace=http://examples.com/PhotoCatalog/types; xmlns:types=http://examples.com/PhotoCatalog/types; !-- Wrapper elements to provide unique signatures for the addPhoto and replacePhoto operations -- xsd:element name=addPhoto xsd:complexType xsd:sequence xsd:element ref=types:PhotoInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=replacePhoto xsd:complexType xsd:sequence xsd:element ref=types:PhotoInfo/ /xsd:sequence /xsd:complexType /xsd:element !-- Output for the addPhoto and replacePhoto operations. -- xsd:element name=status type=xsd:string / !-- Input for the addPhoto and replacePhoto operations. -- xsd:element name=PhotoInfo xsd:complexType xsd:sequence xsd:element name=customerName type=xsd:string/ xsd:element name=photoID type=xsd:int/ !--xsd:element name=photoRef type=wsi:swaRef/-- /xsd:sequence /xsd:complexType /xsd:element /xsd:schema /wsdl:types wsdl:message name=addPhotoRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:addPhoto/ !-- second part is the attachment -- wsdl:part name=photo type=xsd:base64Binary/ /wsdl:message wsdl:message name=addPhotoResponse wsdl:part name=body element=types:status/ /wsdl:message wsdl:message name=replacePhotoRequest wsdl:part name=body element=types:replacePhoto/ wsdl:part name=newPhoto type=xsd:base64Binary/ /wsdl:message wsdl:message name=replacePhotoResponse wsdl:part name=status element=types:status/ /wsdl:message wsdl:portType name=PhotoCatalog wsdl:operation name=addPhoto wsdl:input message=tns:addPhotoRequest/ wsdl:output message=tns:addPhotoResponse/ /wsdl:operation wsdl:operation name=replacePhoto wsdl:input message=tns:replacePhotoRequest/ wsdl:output message=tns:replacePhotoResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=PhotoCatalogBinding type=tns:PhotoCatalog soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=addPhoto soap:operation soapAction=addPhoto/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=photo type=image/jpeg/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation wsdl:operation name=replacePhoto soap:operation soapAction=replacePhoto/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=newPhoto type=image/jpeg/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=PhotoCatalogService wsdl:port name=PhotoCatalogPort binding=tns:PhotoCatalogBinding soap:address location=http://192.168.1.100:8080/axis/services/PhotoCatalogPort/ /wsdl:port /wsdl:service /wsdl:definitions I removed the use of swaRef in accordance with 3.1.4.1 of WS-I Usage Scenarios for the WS-I Attachments Profile 1.0 (version 1.02 http://www.ws-i.org/SampleApplications/UsageScenariosAP-1.02-MRD.pdf) Has anyone successfully processed a SOAP with Attachments request using AXIS 1-2RC3 and a wsdl like the one I have included. Karl
RE: Exception in thread main java.lang.NoClassDefFoundError
Thanks i'll give that a go From: [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: RE: Exception in thread main java.lang.NoClassDefFoundError Date: Tue, 26 Apr 2005 08:46:16 -0400 Looks like you need to put quotes around the specification of classpath. java -cp %AXISCLASSPATH% ... -Original Message- From: Plorks mail [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 6:18 AM To: axis-user@ws.apache.org Subject: Exception in thread main java.lang.NoClassDefFoundError Hello I am following the Axis installation instrunction from here http://ws.apache.org/axis/java/install.html#Step5InstallingNew WebServices I get to step 6 set my classpath then i try to run the admin client using this java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd But i get this error - Exception in thread main java.lang.NoClassDefFoundError: Files\AXIS\axis-1_1\lib\axis/jar checked my classpath and it looks correct C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program Files\AXIS\axis-1_1\lib\saaj.jar; C:\Program Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program Files\AXIS\axis-1_1\lib\activation.jar Can anybody help _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk _ Winks nudges are here - download MSN Messenger 7.0 today! http://messenger.msn.co.uk
Sending SOAP Messages
I am looking for starting code that can send SOAP Messages using AXIS. If you have any then please do share it with me at [EMAIL PROTECTED] Thank You. Given Parameters Server Address: http://www.ripedev.com/webservices/ZipCode.asmx SOAPAction: http://ripedev.com/webservices/CityToZipCode SOAP Message:: ?xml version=1.0 encoding=UTF-8 standalone=no?SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tns=http://ripedev.com/webservices/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; SOAP-ENV:Bodytns:CityToZipCode xmlns:tns=http://ripedev.com/webservices/;tns:Cityatlanta/tns:City/tns:CityToZipCode
Question a service request or response and an handler runs in the same thread??
My problem is to pass information from a Service-client to a ClientRequestHandler and then from a ServerRequestHandler to a Service-provider not making use of the MessageContext. So i' am thinking to use the ThreadLocal pattern to constuct a stateful singleton and in this way pass information from a Service to the Handler and vice versa. Now my question is: are a Service and an Handler or a chain of Handlers different steps of the same Thread. What Happens if for example i do the following: Service service1=new Service(); Service service2=new Service(); Call call1=service1.creatCall(); Call call2=service2.creatCall(); call1.invoke(EndPointRef_1); call2.invoke(EndPointRef_2); Are the different Requests and the subsequent operations of an Handler part of the same Thread ? Thanks in advance for any help.
RPC/Encoded and Java-XML Data Binding
Hi All, I have some basic doubts on RPC/Encoded style wsdl and what is the role of Java to XML Data Binding Frameworks like JAXB, Castor etc. in RPC/Encoded approach when we are going to consume such WSDL using AXIS and how custom serializers or deserializers work with such java to xml data binding frameworks in the process of generating the soap request envelope ? More specifically can we use Java to XML Data Binding frameworks like Castor, JAXB in a RPC/Encoded style wsdl consumption ? If so what are the advantage such approaches ? Also, can anyone please tell me what ALL are the advantages of RPC/Encoded style over document/literal or rpc/literal specially in supporting java collections like HashMap's, Vector's and complex java beans etc. ? Thanks Regards, Kumar.
SAXException: No deserializer
Hello, I'm writing a web service which includes a SOAP interface on an Orion server. This interface has 2 calls, both read-only. They both return an instance of the same object, a custom Java class. One of the instance variables in this class is a java.util.List. It all works well if I just add Strings to the java.util.List - the data gets returned correctly. However, problems arise if I add objects to the List whose type is of a 2nd custom class I've created, rather than Strings. When I try and get data out, I get errors of the type No deserializer for {urn:MyUrn}MyClass, where MyClass is the name of the 2nd custom class I've created. Both custom classes implement java.io.Serializable and I've added a reference to MyClass in the server-config.wsdd file but am unsure as to how to progress further with this error. Thanks, Mark
Domino on Windows 2K/2K3 authentication
Hi I'm new to AXIS and Web Services implementation/development. We are currently developing a web service client/server module to interact with Domino. We would like to authenticate users throughsomeloginrequest. Ideally a SOAP request commandissued toDomino server validatin againsta WIN 2K/2K3user account. How can I authenticate a user in thismanner? Any information anyone could provide would be greatly appreciated. thanks, Mirko
Again CastClassException.. :(
I wroten a Echo WebService: package xpto; public class Echo { public String echoMethod(String arg) { return arg; } } and I did a WSDL2Java to create the stubs. I invoke this way the stub: public String Test(String str){ EchoServiceLocator service = new EchoServiceLocator(); try{ Echo port = service.getEcho(); return port.echoMethod(str); }catch (Exception e) { System.err.println(e.getMessage()); return null; } } And I got an CastClassException... Anybody... please, help me! :( --- Bruno Vg
Re: exception when call.invoke
I already did that but I exactly have the same problem! :( How it can be possible? Thanks anyway! [EMAIL PROTECTED] wrote: What are you running this in ? In a standalone client or in an application server (which one?) Why don't you try using wsdl2java and create stub classes to use instead. It is far simpler. then your call to the web service just becomes: ret = echoWebService.test(code,utilizador_portal,password); -Original Message- From: Bruno Gonalves [mailto:[EMAIL PROTECTED]] Sent: Friday, April 15, 2005 5:37 AM To: axis-user@ws.apache.org Subject: exception when call.invoke Hi there! I receive this exception: java.lang.ClassCastException: org.apache.axis.transport.http.HTTPSender ,when I execute this code: try { String endpoint = "http://localhost:8080/axis/Echo.jws"; logger.info("DEBUG 1"); Service service = new Service(); logger.info("DEBUG 2"); Call call = (Call) service.createCall(); logger.info("DEBUG 3"); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperation("test"); call.addParameter("code", XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("utilizador_portal", XMLType.XSD_STRING, ParameterMode.IN); call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); logger.info("DEBUG 4"); //call.setOperationName(new QName("http://soapinterop.org/", "test")); //logger.info("DEBUG 5"); String ret = (String) call.invoke(new Object[] {"123", "user", "passwd"}); = EXCEPTION!! logger.info("DEBUG 6"); System.out.println("RESULT '" + ret + "'"); logger.info("DEBUG 7"); } catch (Exception e) { System.err.println(e.toString()); } Any help? :( --- Bruno Vg
Re: Sending SOAP Messages
I modified one of the samples (misc/TestClient.java). On first look It seems to work. I am listing the code here. Is there an easy way, given a wsdl and a method name, to generate Server Address, SOAPAction and SOAP Message? public static String msg = ?xml version=\1.0\ encoding=\utf-8\? + soap:Envelope xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\; xmlns:xsd=\http://www.w3.org/2001/XMLSchema\; xmlns:soap=\http://schemas.xmlsoap.org/soap/envelope/\; + soap:Body + CityToZipCode xmlns=\http://ripedev.com/webservices/\; + Cityatlanta/City + /CityToZipCode + /soap:Body + /soap:Envelope; public static String doTest (String args[], String op) throws Exception { Options opts= new Options( args ); String url = http://www.ripedev.com/webservices/ZipCode.asmx;; String soapAction = http://ripedev.com/webservices/CityToZipCode; ; if (op != null) soapAction = op; args = opts.getRemainingArgs(); if ( args != null ) soapAction = args[0]; InputStream input = new ByteArrayInputStream(msg.getBytes()); Service service = new Service(); Call call= (Call) service.createCall(); SOAPEnvelope env = new SOAPEnvelope(input); call.setTargetEndpointAddress( new URL(url) ); if (soapAction != null) { call.setUseSOAPAction( true ); call.setSOAPActionURI( soapAction ); } System.out.println( Request:\n + msg ); env = call.invoke( env ); System.out.println( Response:\n + env.toString() ); return( env.toString() ); } Thanks, Rakesh On 4/26/05, Plorks mail [EMAIL PROTECTED] wrote: Have you found any help yet? I'm looking to do soemthing similar and very stuck From: Rakesh Lakshminarayana [EMAIL PROTECTED] Reply-To: Rakesh Lakshminarayana [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: Sending SOAP Messages Date: Tue, 26 Apr 2005 09:48:40 -0400 I am looking for starting code that can send SOAP Messages using AXIS. If you have any then please do share it with me at [EMAIL PROTECTED] Thank You. Given Parameters Server Address: http://www.ripedev.com/webservices/ZipCode.asmx SOAPAction: http://ripedev.com/webservices/CityToZipCode SOAP Message:: ?xml version=1.0 encoding=UTF-8 standalone=no?SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tns=http://ripedev.com/webservices/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; SOAP-ENV:Bodytns:CityToZipCode xmlns:tns=http://ripedev.com/webservices/;tns:Cityatlanta/tns:City/tns:CityToZipCode _ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
RE: communication between the Handler and the Service
ashutosh, thanks for taking the time to reply. I tried the test code and the resolution you had posted but it did not make any difference. Then i went on to try the sample code you had and realized that i don't get the problem that was posted as a bug. I didn't even need to call setSOAPEnvelope() method. May be the issue is gone away in 1.2RC3. However my problem still persists. My issue is that i don't want to add a new element to the body but rather i'd like to modify an existing one. See the code below. None of the saveChanges() or setSOAPEnvelope() or other method calls can make the modified body persist beyon the scope of the invoke() method in the handler: public void invoke(MessageContext context) { ... Node someNode = body.getElementsByTagName(MyNodeName).item(0); someNode.appendChild( body.getOwnerDocument().createTextNode( someTextForMyNode)); // print the body now // the oputput includes the new text node System.out.println(XMLUtils.ElementToString(body)); // the body shows the modification correctly here // however after the message is forwarded to the service // you can no longer see the changes --- Shahi, Ashutosh [EMAIL PROTECTED] wrote: Jeff, I haven't gone through the entire discussion, but the problem might be linked to http://issues.apache.org/jira/browse/AXIS-1469 See if it helps. Thanks, Ashutosh -Original Message- From: Jeff Saremi [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 8:47 PM To: axis-user@ws.apache.org Subject: Re: communication between the Handler and the Service It did not make any difference. or I don't how when and where to call it. I called saveChanges() after the modifications to the body but the Service still printed the old body xml. jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: I think I used that one too. But let me give it another try and get back to you. jeff --- Jeff Greif [EMAIL PROTECTED] wrote: Have you noticed the method saveChanges on SOAPMessage? Jeff Jeff Saremi wrote: So i played more with this and here's what i found out: - In the handler, the changes to the message, envelope and body will all get saved and passed to the Service afterwards - Any chnages to the nodes inside the body are allowed to be made and displayed while in the handler but beyond that none of those changes make it! ** some where in the handler ** public void invoke(MessageContext context) { ... Node someNode = body.getElementsByTagName(MyNodeName).item(0); someNode.appendChild( body.getOwnerDocument().createTextNode(someTextForMyNode)); // print the body now // the oputput will include the new text node System.out.println(XMLUtils.ElementToString(body)); // out of desperation you can do the following // which should not be needed // but they won't help you with the new Node // being added to the body and hence being passed // to your Service down the chain envelope.removeBody(); envelope.setBody(body); Message newMessage = new Message(envelope); messageContext.setRequestMessage(newMessage); } ** some time later inside the Service ** public Element[] service(Element[] elements) { for (int i = 0; i elements.length; i++) { // print the elements to your hearts content // you will not see any traces of the textnode // you added in your handler // all you see is the original elements System.out.println( XMLUtils.ElementToString(elements[i])); } return elements; } jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: I should have explained more about what i'm doing. I don't know where this processRequest() method is. It looks like there are two or more Handler concepts within Axis. The Handler that i'm talking about are the ones you specify in the requestFlow or responseFlow chains: service name=MyService style=message parameter name=className value=MyService / parameter name=allowedMethods value=service / requestFlow handler type=java:MyHandler/ /requestFlow /service Here's the method that MyHandler overrides. The code below is just to point out the problem -- this is not how i'm planning on writing my final code: public class WARPHandler extends BasicHandler { public void invoke(MessageContext context) throws AxisFault { try { Message message = context.getRequestMessage(); SOAPEnvelope envelope = message.getSOAPEnvelope(); SOAPBody body = envelope.getBody(); // do some modification to the elements in the body // ... System.out.println( Is Body referenced? + (body ==
Re: Exception in thread main java.lang.NoClassDefFoundError
Hi, Try relocating the jar fro the directory for e.g C:\Program Files\axis1.2rc3\... to something like C:\Axis1.2rc3\. This should resolve your problem. FYI : This probem arises due to 8.3 file format on windows. Plorks mail wrote: Hello I am following the Axis installation instrunction from here http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices I get to step 6 set my classpath then i try to run the admin client using this java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd But i get this error - Exception in thread main java.lang.NoClassDefFoundError: Files\AXIS\axis-1_1\lib\axis/jar checked my classpath and it looks correct C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program Files\AXIS\axis-1_1\lib\saaj.jar; C:\Program Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program Files\AXIS\axis-1_1\lib\activation.jar Can anybody help _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk
Re: Exception in thread main java.lang.NoClassDefFoundError
Yes, i've just movedeverythign to a simpler folder c:\axis so i'll try again Cheers From: Rohitdev Kulshrestha [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: Exception in thread main java.lang.NoClassDefFoundError Date: Tue, 26 Apr 2005 21:47:24 +0530 Hi, Try relocating the jar fro the directory for e.g C:\Program Files\axis1.2rc3\... to something like C:\Axis1.2rc3\. This should resolve your problem. FYI : This probem arises due to 8.3 file format on windows. Plorks mail wrote: Hello I am following the Axis installation instrunction from here http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices I get to step 6 set my classpath then i try to run the admin client using this java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd But i get this error - Exception in thread main java.lang.NoClassDefFoundError: Files\AXIS\axis-1_1\lib\axis/jar checked my classpath and it looks correct C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program Files\AXIS\axis-1_1\lib\saaj.jar; C:\Program Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program Files\AXIS\axis-1_1\lib\activation.jar Can anybody help _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk
Re: RPC/Encoded and Java-XML Data Binding
Hi Anne, Thank you for the response. Can you please tell me why we cannot use any Java to XML Binding frameworks like castor when trying to consme a RPC/Encoded style WSDL ? Soap encoding using xml schemas and can't we castor to serializer soap request envelope in the format specified by xml schema in the wsdl ? Please suggest ... Thanks Regards, Kumar. On 4/26/05, Anne Thomas Manes [EMAIL PROTECTED] wrote: Also -- from my perspective, there are absolutely no advantages of using SOAP encoding over literal encoding. That's of course working on the assumption that the reason you are using SOAP is to enable heterogeneous interoperability. If you want to use SOAP in place of a homogeneous distributed object system like RMI, then there might be some small advantage in using SOAP encoding when passing rich object graphs. But if you want to do homogeneous distributed object computing, then you should use RMI, not SOAP. All performance tests I've seen show that RPC/encoded is slower than RPC/literal or doc/literal. And a huge number of interop problems are caused by SOAP encoding. I'm sure that Glen Daniels has a different opinion, though. Anne On 4/26/05, Anne Thomas Manes [EMAIL PROTECTED] wrote: You can't use a Java/XML binding framework with RPC/encoded. They only work with literal encodings. On 4/26/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, I have some basic doubts on RPC/Encoded style wsdl and what is the role of Java to XML Data Binding Frameworks like JAXB, Castor etc. in RPC/Encoded approach when we are going to consume such WSDL using AXIS and how custom serializers or deserializers work with such java to xml data binding frameworks in the process of generating the soap request envelope ? More specifically can we use Java to XML Data Binding frameworks like Castor, JAXB in a RPC/Encoded style wsdl consumption ? If so what are the advantage such approaches ? Also, can anyone please tell me what ALL are the advantages of RPC/Encoded style over document/literal or rpc/literal specially in supporting java collections like HashMap's, Vector's and complex java beans etc. ? Thanks Regards, Kumar.
Re: Serialization of gif image
This doesn't seem to be causing Axis a problem, but other SOAP stacks will probably barf. There is no such service style as wrapped in WSDL. You should change it to document. (From a WSDL perspective wrapped is a programming convention identified by the fact that your soap body element has the same name as the operation. The style=wrapped attribute is only used in the Axis WSDD.) This: soap:binding style=wrapped transport=http://schemas.xmlsoap.org/soap/http/ Should be this: soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ Regards, Anne On 4/26/05, Schwarz, Karl [EMAIL PROTECTED] wrote: Hi, I've got a service defined that is transferring an java.awt.Image using SOAP with attachments. Here is the WSDL: wsdl:definitions name=ImageryService targetNamespace=http://examples.com/ImageService; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:types=http://examples.com/ImageService/types; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://examples.com/ImageService; wsdl:types !-- types namespace for this service -- xsd:schema targetNamespace=http://examples.com/ImageService/types; xmlns:types=http://examples.com/ImageService/types; !-- Wrapper elements to provide unique signatures for the operations -- xsd:element name=addImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=replaceImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=getImage xsd:complexType xsd:sequence xsd:element ref=types:ImageInfo/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=ImageInfo xsd:complexType xsd:sequence xsd:element name=name type=xsd:string/ xsd:element name=id type=xsd:int/ xsd:element name=lat type=xsd:double/ xsd:element name=lon type=xsd:double/ xsd:element name=time type=xsd:dateTime/ /xsd:sequence /xsd:complexType /xsd:element !-- Status return for the operations. -- xsd:element name=status type=xsd:string / /xsd:schema /wsdl:types !-- Input for the operations. -- wsdl:message name=addImageRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:addImage/ !-- second part is the attachment -- wsdl:part name=image type=xsd:base64Binary/ /wsdl:message wsdl:message name=addImageResponse wsdl:part name=body element=types:status/ /wsdl:message wsdl:message name=getImageRequest !-- first part is the SOAP body -- wsdl:part name=body element=types:getImage/ /wsdl:message wsdl:message name=getImageResponse wsdl:part name=status element=types:status/ !-- second part is the attachment -- wsdl:part name=image type=xsd:base64Binary/ /wsdl:message wsdl:message name=replaceImageRequest wsdl:part name=body element=types:replaceImage/ wsdl:part name=newImage type=xsd:base64Binary/ /wsdl:message wsdl:message name=replaceImageResponse wsdl:part name=status element=types:status/ /wsdl:message wsdl:portType name=ImageryServicePortType wsdl:operation name=addImage wsdl:input message=tns:addImageRequest/ wsdl:output message=tns:addImageResponse/ /wsdl:operation wsdl:operation name=getImage wsdl:input message=tns:getImageRequest/ wsdl:output message=tns:getImageResponse/ /wsdl:operation wsdl:operation name=replaceImage wsdl:input message=tns:replaceImageRequest/ wsdl:output message=tns:replaceImageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=ImageryServiceBinding type=tns:ImageryServicePortType soap:binding style=wrapped transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=addImage soap:operation soapAction=addImage/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=image type=image/gif/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation wsdl:operation name=getImage soap:operation soapAction=getImage/ wsdl:input soap:body parts=body use=literal/ /wsdl:input wsdl:output mime:multipartRelated mime:part soap:body parts=status use=literal/ /mime:part mime:part mime:content part=image type=image/gif/ /mime:part /mime:multipartRelated /wsdl:output /wsdl:operation wsdl:operation name=replaceImage soap:operation soapAction=replaceImage/ wsdl:input mime:multipartRelated mime:part soap:body parts=body use=literal/ /mime:part mime:part mime:content part=newImage type=image/gif/ /mime:part /mime:multipartRelated /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=ImageryService wsdl:port name=ImageryService binding=tns:ImageryServiceBinding soap:address location=http://192.168.1.1:8080/axis/services/ImageryService/ /wsdl:port /wsdl:service /wsdl:definitions It
RE: communication between the Handler and the Service
I think I'm getting a better understanding of the problem. here' what i found so far: - this problem is very much similar to what was reported (and probably not fixed comprehensively) in http://issues.apache.org/jira/browse/AXIS-283 - what XMLUtils produces and what SerializationContext outputs are completely different. SC does not output any changes that are in the memory! Compare the following pieces after some modification to one of the nodes in the body: // this one shows all my changes System.out.println( XMLUtils.ElementToString(env.getBody())); // however this one does not -- why? // this is very frustrating SerializationContext serContext = new SerializationContext(new PrintWriter(System.out), messageContext); serContext.setSendDecl(true); serContext.setEncoding(UTF-8); body.output(serContext); Is this a bug? how can we report it if so? thanks jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: ashutosh, thanks for taking the time to reply. I tried the test code and the resolution you had posted but it did not make any difference. Then i went on to try the sample code you had and realized that i don't get the problem that was posted as a bug. I didn't even need to call setSOAPEnvelope() method. May be the issue is gone away in 1.2RC3. However my problem still persists. My issue is that i don't want to add a new element to the body but rather i'd like to modify an existing one. See the code below. None of the saveChanges() or setSOAPEnvelope() or other method calls can make the modified body persist beyon the scope of the invoke() method in the handler: public void invoke(MessageContext context) { ... Node someNode = body.getElementsByTagName(MyNodeName).item(0); someNode.appendChild( body.getOwnerDocument().createTextNode( someTextForMyNode)); // print the body now // the oputput includes the new text node System.out.println(XMLUtils.ElementToString(body)); // the body shows the modification correctly here // however after the message is forwarded to the service // you can no longer see the changes --- Shahi, Ashutosh [EMAIL PROTECTED] wrote: Jeff, I haven't gone through the entire discussion, but the problem might be linked to http://issues.apache.org/jira/browse/AXIS-1469 See if it helps. Thanks, Ashutosh -Original Message- From: Jeff Saremi [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 8:47 PM To: axis-user@ws.apache.org Subject: Re: communication between the Handler and the Service It did not make any difference. or I don't how when and where to call it. I called saveChanges() after the modifications to the body but the Service still printed the old body xml. jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: I think I used that one too. But let me give it another try and get back to you. jeff --- Jeff Greif [EMAIL PROTECTED] wrote: Have you noticed the method saveChanges on SOAPMessage? Jeff Jeff Saremi wrote: So i played more with this and here's what i found out: - In the handler, the changes to the message, envelope and body will all get saved and passed to the Service afterwards - Any chnages to the nodes inside the body are allowed to be made and displayed while in the handler but beyond that none of those changes make it! ** some where in the handler ** public void invoke(MessageContext context) { ... Node someNode = body.getElementsByTagName(MyNodeName).item(0); someNode.appendChild( body.getOwnerDocument().createTextNode(someTextForMyNode)); // print the body now // the oputput will include the new text node System.out.println(XMLUtils.ElementToString(body)); // out of desperation you can do the following // which should not be needed // but they won't help you with the new Node // being added to the body and hence being passed // to your Service down the chain envelope.removeBody(); envelope.setBody(body); Message newMessage = new Message(envelope); messageContext.setRequestMessage(newMessage); } ** some time later inside the Service ** public Element[] service(Element[] elements) { for (int i = 0; i elements.length; i++) { // print the elements to your hearts content // you will not see any traces of the textnode // you added in your handler // all you see is the original elements System.out.println( XMLUtils.ElementToString(elements[i])); } return elements; } jeff --- Jeff Saremi [EMAIL PROTECTED] wrote: I should have explained more about what i'm doing. I don't know where
RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Anne I have tracked my ongoing 'SimpleDeserializer' SAX exception down to my 'wrapped/literal' web service's handling of an expected Vector-type value in the invoked web service 'addUser' method's parameter, which is of type 'HashMap'. Is there a known problem at AXIS 1.1 when 'wrapped/literal' web services have to handle Vector-type values within HashMap's ? If you could take a look at the attached 'tcpmon' trace of a request/response between the original RPC/Encoded client/service ('TSMAdapter RPC Enc addUser.log ') you will see that there is an item representing a Vector defined thus: item key xsi:type=xsd:stringalias/key value href=#id2/ /item multiRef id=id2 soapenc:root=0 soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xsi:type=ns3:Vector xmlns:ns3=http://xml.apache.org/xml-soap; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; item xsi:type=xsd:string[EMAIL PROTECTED]/item item xsi:type=xsd:string[EMAIL PROTECTED]/item /multiRef If you then take a look at the attached 'tcpmon' trace of a request/response between the converted Wrapped/literal client/service ('TSMAdapter Wrapped Lit addUser.log') you will see that the equivalent item representing a Vector is defined thus: item keyalias/key value item[EMAIL PROTECTED]/item item[EMAIL PROTECTED]/item /value /item You will also then see the exception being returned in this trace. I have checked that removal of this all other such Vector-type values from the 'hUserDtls' HashMap passed as a parameter by the client on the 'addUser' invocation prevents the 'SimpleDeserializer' SAX exception. Could you guide me as to what I need to do to get my 'wrapped/literal' web service to handle such Vector-type values ? Many Thanks, Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 19 April 2005 13:23 To: Timothy Thorpe; axis-user@ws.apache.org Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Tim, The operation parameters you've specified in your WSDD are wrong. In wrapped mode, your input parameters are the same as the operation name. Anne On 4/19/05, Timothy Thorpe [EMAIL PROTECTED] wrote: Anne I have read your blogger article the wiki reference. Thank you for the new WSDL. I have supplied it to the AXIS 1.1 version of 'WSDLToJava' generate my client stub code, via the following command: java org.apache.axis.wsdl.WSDL2Java \Tomcat\jakarta-tomcat-4.1.30\webapps\TSMAdapter_wrapped\WEB-INF\classes\net \cp\adapter\TSMAdapter_wrapped.wsdl I used two versions of WSDD file (both attached) to deploy my AXIS 1.1 web service, via the following command: java org.apache.axis.client.AdminClient -lhttp://localhost:9249/TSMAda pter_wrapped/services/AdminService deploy.wsdd Processing file deploy.wsdd AdminDone processing/Admin Note in particular this line in the first WSDD file: service name=TSMAdapter_wrapped style=wrapped use=literal Then a modified version of this line in the second WSDD file: service name=TSMAdapter_wrapped style=document use=literal Unfortunately, with the web service deployed using either version of the WSDD, I still get the same 'SimpleDeserializer' SAX exception - I have attached 'tcpmon' output of the failing request/response (also, for good measure, the equivalent 'tcpmon' output of the working request/response for the RPC/Encoded version of the client/service). Clearly I am doing something wrong here because wrapped/literal does work for AXIS 1.1. I do appreciate the help you are giving me. Thanks, Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 23:21 To: Timothy Thorpe Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Here's a wrapped version of your WSDL: ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=urn:TSMAdapter xmlns:impl=urn:TSMAdapter xmlns:intf=urn:TSMAdapter xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns=http://schemas.xmlsoap.org/wsdl/; wsdl:types schema xmlns=http://www.w3.org/2001/XMLSchema; targetNamespace=http://xml.apache.org/xml-soap; complexType name=mapItem sequence element name=key nillable=true type=xsd:string/ element name=value nillable=true type=xsd:string/ /sequence /complexType complexType name=Map sequence element name=item minOccurs=0 maxOccurs=unbounded type=apachesoap:mapItem/ /sequence /complexType /schema schema xmlns=http://www.w3.org/2001/XMLSchema; targetNamespace=urn:TSMAdapter import namespace=http://xml.apache.org/xml-soap/ complexType name=TSMAdapterResponse
Axis 1.1 vs Axis 1.2rc3 and derived types
Hello all, We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0 (unless there's another workaround for the package enum that I didn't find?). I have a web service which uses abstract classes/types but when I switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis creates is no longer representing many (mostly all) of the derived classes... The abstract classes are still created but the classes derived from the abstract class no longer get written to the wsdl... If I expose another method to axis (via server-config.wsdd) in the same class which uses the base type, only THEN will the derived types get written to the wsdl properly... I've searched through the mailing lists to the best of my ability but I can't find this exact issue. Could anybody point me in the right direction or has anybody seen similar issues? I can provide some simple sample classes if people wish but every time I post a 'lengthy' message, I get no replies... :) Thanks, -Clint
WS-Security Binary Token Help Needed
Need help learning how to insert/retrieve WS-Security Binary Token into message using Axis handlers. Surely someone has an example demonstrating a technique for achieving this task using either WSS4J's toolkit or some other means. Any help/direction on this topic is most appreciated. Regards, Shawn
Re: Axis 1.1 vs Axis 1.2rc3 and derived types
this is definitely looks like a bug. do you have a stripped down test case that can be used to recreate the bug? (please open a bug report) thanks, dims On 4/26/05, Dovholuk, Clint [EMAIL PROTECTED] wrote: Hello all, We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0 (unless there's another workaround for the package enum that I didn't find?). I have a web service which uses abstract classes/types but when I switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis creates is no longer representing many (mostly all) of the derived classes... The abstract classes are still created but the classes derived from the abstract class no longer get written to the wsdl... If I expose another method to axis (via server-config.wsdd) in the same class which uses the base type, only THEN will the derived types get written to the wsdl properly... I've searched through the mailing lists to the best of my ability but I can't find this exact issue. Could anybody point me in the right direction or has anybody seen similar issues? I can provide some simple sample classes if people wish but every time I post a 'lengthy' message, I get no replies... :) Thanks, -Clint -- Davanum Srinivas - http://webservices.apache.org/~dims/
RE: Axis 1.1 vs Axis 1.2rc3 and derived types
thanks dims, bug 1955 created : http://issues.apache.org/jira/browse/AXIS-1955 -clint (posted to the mailing list in case anyone else wants to view) -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 3:26 PM To: axis-user@ws.apache.org Subject: Re: Axis 1.1 vs Axis 1.2rc3 and derived types this is definitely looks like a bug. do you have a stripped down test case that can be used to recreate the bug? (please open a bug report) thanks, dims On 4/26/05, Dovholuk, Clint [EMAIL PROTECTED] wrote: Hello all, We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0 (unless there's another workaround for the package enum that I didn't find?). I have a web service which uses abstract classes/types but when I switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis creates is no longer representing many (mostly all) of the derived classes... The abstract classes are still created but the classes derived from the abstract class no longer get written to the wsdl... If I expose another method to axis (via server-config.wsdd) in the same class which uses the base type, only THEN will the derived types get written to the wsdl properly... I've searched through the mailing lists to the best of my ability but I can't find this exact issue. Could anybody point me in the right direction or has anybody seen similar issues? I can provide some simple sample classes if people wish but every time I post a 'lengthy' message, I get no replies... :) Thanks, -Clint -- Davanum Srinivas - http://webservices.apache.org/~dims/
obtaining consumer IP
Hi! I would need to obtain the IP address of clients/consumers that make calls to my Web services, preferably using a SOAP handler. So far, I have not found a way of achieving this. The MessageContext seems to be the only data I have in a handler, and from what I understand it does not contain the client's IP. Any hints and ideas are greatly appreciated. Rob
Re: obtaining consumer IP
From the MessageContext you can get the HttpServletRequest and from that the IP: HttpServletRequest req = (HttpServletRequest) msgContext.getProperty(org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLETREQUEST); String ip = req.getRemoteAddr(); However, keep in mind that the IP address may be misleading if the client is going through a proxy or you have a load balancer in front of your server or a caching server, etc. I know in a real production system you will most likely get a local IP address. Also, if you want to do security based on the IP address, keep in mind that IP addresses can be easily spoofed. For this reason I find relying on the IP address to be a bad plan. Tim Robert Gombotz wrote: Hi! I would need to obtain the IP address of clients/consumers that make calls to my Web services, preferably using a SOAP handler. So far, I have not found a way of achieving this. The MessageContext seems to be the only data I have in a handler, and from what I understand it does not contain the client's IP. Any hints and ideas are greatly appreciated. Rob
RemoteException: java.lang.NullPointerException
Hi, I received a RemoteException: java.lang.NullPointerException after my client makes a WS method call. I used the WSDL2Java utility to create client stub classes. The server side is hosted by Microsoft IIS. I turned on the debugger and found where the exception is thrown as following: {http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:396) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserI mpl.java:395) at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon textImpl.java:246) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538) at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:675 ) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java: 71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180) at org.apache.axis.client.Call.invokeEngine(Call.java:2564) at org.apache.axis.client.Call.invoke(Call.java:2553) at org.apache.axis.client.Call.invoke(Call.java:2248) at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at com.microsoft.schemas.sqlserver._2003._12.reporting.reportingservices.Report ingServiceSoapStub.listSecureMethods(ReportingServiceSoapStub.java:1703) at responsys.advrpt.msrsclient.MSRSClient.getChildrenList(MSRSClient.java:54) at responsys.advrpt.msrsclient.MSRSClient.main(MSRSClient.java:116) I also checked the XML sent and the XML received. The debugging message shows that the HTTP content of the XML sent is null and the XML received is nothing as following: - XML sent: - --- - --- - POST /ReportServer/ReportService.asmx HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.1 Host: testshabd Cache-Control: no-cache Pragma: no-cache SOAPAction: http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/ ListSecureMethods Content-Length: 373 Null . XML received: Do you know what could be a problem? Thanks a lot, James
TCP Monitor
Hi, I like to use tcpmon to see outgoing messages and incoming messages of my java WS client. The server side is hosted by Microsoft IIS. I am not sure the exact arguments (listenPort targetHost targetPort) in this case. What is the listen port? I assume the targetHost is the machine of the server side. I think the targetPort is 80 by default in IIS. Thanks for your help, James
Sending array of complex types from Axis to .Net
Title: Sending array of complex types from Axis to .Net I've seen a lot of discussion on the mailing list about sending arrays of complex types from Axis to .Net. I'm having the opposite problem, I'm trying to send an array of complex types from a .Net client to an Axis server. The server appears to deserialize the array correctly, but all the values of the complex type are blank. I'm assuming it's a problem with how .Net is encoding the complex type. Can anyone tell me where to start? I am using Axis 1.2RC3. I am not very familiar with WSDL and am letting access generate the WSDL from my java class. Thanks, Tom.
Re: TCP Monitor
James, TCPMonitor listens for connections at the specified port on the machine on which it is running. This port is any free port you know of or guess at, e.g. is unlikely to be in use. The client-side software must be configured to use the TCPMonitor by replacing the target host name and port (which could just be the default port 80). Here's what to do, assuming that TCPMonitor will be running on the same computer as the client software (if it isn't then change 127.0.0.1 that appears below for the host name or IP address of the machine running TCPMonitor): - Pick a port number for TCPMonitor to listen on, let's suppose it's . - Make a note of the target host name (or IP address) plus the port number of the target web service. E.g. for http://services.xmethods.net/soap/servlet/rpcrouter the host name is services.xmethods.net and the port number is 80. E.g. for http://10.0.0.12:8080/axis/services/ScsServiceSoap the IP address is 10.0.0.12 and the port number is 8080. - Now change the target web service URL in the client-side code to point to TCPMonitor. E.g. http://services.xmethods.net/soap/servlet/rpcrouter becomes http://127.0.0.1:/soap/servlet/rpcrouter E.g. http://10.0.0.12:8080/axis/services/ScsServiceSoapbecomes http://127.0.0.1:/axis/services/ScsServiceSoap - Recompile the client-side code. - Start TCPMonitor and enter the Listen Port # as . Enter the appropriate Target Hostname and the Target Port # as noted in the second step E.g. for http://services.xmethods.net/soap/servlet/rpcrouter Target Hostname is services.xmethods.net and the Target Port # is 80 E.g. for http://10.0.0.12:8080/axis/services/ScsServiceSoapTarget Hostname is 10.0.0.12 and the Target Port # is 8080 - After entering the correct data, start TCPMonitor listening by clicking the Add button. - Run the client software and watch TCPMonitor for activity. Jeff - Original Message - From: James Chiu To: axis-user@ws.apache.org Sent: Tuesday, April 26, 2005 7:06 PM Subject: TCP Monitor Hi, I like to use tcpmon to see outgoing messages and incoming messages of my java WS client. The server side is hosted by Microsoft IIS. I am not sure the exact arguments (listenPort targetHost targetPort) in this case. What is the listen port? I assume the targetHost is the machine of the server side. I think the targetPort is 80 by default in IIS. Thanks for your help, James