CLIENT_SOAP_NO_SOAP_METHOD
Hello All, I am trying to achieve following sequence : JAVA object --à JAVA SOAP Client -à SOAP Server --à execute CPP method. For this reason I am using the Apache Axis C++. I am trying the Calculator example given in the bundle. I have used Apache Axis SOAP Server version 1.4 on debian and got it running properly with all the configurations. But now issue is the JAVA SOAP Client is not able to communicate with this server. It is not recognizing the SOAP request. The error in the server log is : - Severity Level : CRITICAL time : Fri May 26 12:17:02 2006 file : ServerAxisEngine.cpp line : 332 Exception::AxisSoapException:Request method is not a soap method - Severity Level : CRITICAL time : Fri May 26 12:22:37 2006 file : ServerAxisEngine.cpp line : 180 CLIENT_SOAP_NO_SOAP_METHOD: - Am I missing anyting ? Is client not sending the proper SOAP method ? Can anybody please let me know where can I find the compatible JAVA Client for Axis c++ SOAP Server ? Please let me know .. Thanks In Advance Nikhil __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] Custom security context token
Title: [axis2] Custom security context token Hello, I'm trying to talk to a .NET service that requires messages to be signed and encrypted (using a symetric key created by a custom algorithm). I have .NET client code for this that I would like to duplicate under Java using Axis2 and WSS4J. The .NET client does the following to create a SecurityContextToken: UsernameToken unt = new UsernameToken(user, user); unt.Id = UTID; sct = new SecurityContextToken(unt, SCTIdentifier); sct.KeyBytes = sKey; sct.LifeTime = new Microsoft.Web.Services2.Security.LifeTime(SCTExpires.ToLocalTime()); and then signs and encrypts the message using: service.RequestSoapContext.Security.Tokens.Clear(); service.RequestSoapContext.Security.Elements.Clear(); service.RequestSoapContext.Security.Tokens.Add(sct); service.RequestSoapContext.Security.Elements.Add(new EncryptedData(sct)); service.RequestSoapContext.Security.Elements.Add(new MessageSignature(sct)); Creating the key is not a problem. A method of signing and encrypting SOAP messages in a similar manner using Axis2 and WSS4J is not obvious. How can i create a custom security context token using WSS4J? How can i apply that token to a message sent using Axis2? Thanks
Re: Complex type problem
Dear Anne,I think that i have declared it here: beanMapping xmlns:ns=" http://ejb.test.com/rd" qname="ns:RequestData" languageSpecificType="java:com.test.ejb.rd.RequestData"/I tried to set my complex type only with a String ant an int var. It worked. I tried it with 2 Strings and both Strings take the same value (the value of the first string) when i call the service. In the Soap monitor i can see that both string are sent with different values. Have you ever any similar problems?Anne Thomas Manes [EMAIL PROTECTED] έγραψε: Roy,You have an error in your WSDD:parameter qname="pns:reqData" xmlns:pns=" http://test.com/ejb/" type="ns:RequestData" xmlns:tns="http://www.w3.org/2001/XMLSchema " /You have not declared the "ns" namespace.AnneOn 5/26/06, Suyog Gandhi [EMAIL PROTECTED] wrote: Check out the issue AXIS2-770 , may be it is realted to this. I faced problems about serialization of complex types. 2nd level of nesting is not working. Once I re-structure wsdl for only 1 level of nesting, it started working. e.gfollowing complex type does NOTwork: ( Gives null for Name and Value for the attributes. ) WMemberInfo ---|- ID ---|- Attrbutes [] -|- Name -|- Value Following complex type works. WMemberInfo |- ID |- Attr1Name |- Attr1 Value |- Attr2 Name |- Attr2 Value But this is a crude workaround till the time problem is fixed. Hope this helps. Suyog -Original Message-From: robert lazarski [mailto:[EMAIL PROTECTED]]Sent: Friday, May 26, 2006 9:36 AMTo: axis-user@ws.apache.orgSubject: Re: Complex type problem The other thing is make sure your vendor supports wsdl2java -jboss does not, for example (although they run a modified version of axis 1.2internally). The problem I had was similair, although IIRC correctly I wasgetting ser / deser errors, not null. It was working on simple types butfailing on complex ones. HTH,Roberthttp://www.braziloutsource.com/ On 5/26/06, Roy[EMAIL PROTECTED] wrote:I think that this is not exactly my problem. I can call normally the service from my client when i use simple types. When i try to pass complex types i face the problem.robert lazarski [EMAIL PROTECTED] έγραψε: You'retrying to use a non-ejb client to connect to a Web Service that implementsimplements SessionBean, is that correct? The only way I got that to work -using jboss - was something like...// remote ejb / webserviceprivate CallCentreWebEndpointendpoint;String wsdl_loc = "http://localhost:8080/CallCentreWebServiceJAR?wsdl";// generated by JSWDP wscompile, which jboss insists onusingURL mappinglocation =ClassLoader.getSystemResource("CallCentreWeb_Mapping.xml");assertNotNull(mappinglocation);// bean mappingURL ws4eeMetaData =ClassLoader.getSystemResource("ws4ee-deploy.xml");assertNotNull(ws4eeMetaData);QName qname = new QName("http://localhost/callcentreweb","CallCentreWebService");URL url ="" newURL(wsdl_loc);org.jboss.webservice.client.ServiceFactoryImpl factory=(org.jboss.webservice.client.ServiceFactoryImpl) ServiceFactoryImpl.newInstance();javax.xml.rpc.Service service = factory.createService(url,mappinglocation, ws4eeMetaData, qname,null);endpoint = (CallCentreWebEndpoint)service.getPort(CallCentreWebEndpoint.class);The main idea here isServiceFactoryImpl, which varies by vendor. This may not be your problem,but thought I'd post it in case it helps. HTH,Roberthttp://www.braziloutsource.com/ On 5/26/06, Roy[EMAIL PROTECTED] wrote:I tried the beanmapping too but it didn't work. This is the the complex type i want to send and the deploy.wsdd file:Deploy.wsdd:deployment xmlns="http://xml.apache.org/axis/wsdd/ " xmlns:java=" http://xml.apache.org/axis/wsdd/providers/java" service name="EJBTestService" provider="java:EJB"parameter name="wsdlTargetNamespace" value="http://ejb.test.com"/ parameter name="beanJndiName" value="ejb/TestService"/parameter name="homeInterfaceName" value="com.test.ejb.TestServiceHome"/ parameter name="remoteInterfaceName" value=" com.test.ejb.TestService"/parameter name="allowedMethods" value="*"/ operation name="sendData" qname="operNS:SendData" xmlns:operNS=" http://test.com/ejb/" returnQName="retNS:Result" xmlns:retNS=" http://test.com/ejb/" returnType="rtns:int" xmlns:rtns=" http://www.w3.org/2001/XMLSchema"parameter qname="pns:reqData" xmlns:pns=" http://test.com/ejb/" type="ns:RequestData" xmlns:tns="http://www.w3.org/2001/XMLSchema "
[Axis2] [ADB] Generated code is flawed
Hi, I'm trying to convert an object to an OMElement, as described in the ADB Howto (http://ws.apache.org/axis2/1_0/adb/adb-howto.html). In fact, I'm doing exactly the same as in the code snippets in the howto -- using the same xml and code examples. I'm hitting a problem when I have created the OMElement using the StAXOMBuilder: the OMElement that is produced is *not* the top-level myElement element, but one of the sub-elements varString. I had to change both the XSD and the XML a bit in order to get the example correct and working: schema xmlns=http://www.w3.org/2001/XMLSchema xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:tns=http://soapinterop.org/types targetNamespace=http://soapinterop.org/types elementFormDefault=qualified complexType name=SOAPStruct sequence element name=varString type=xsd:string/ element name=varInt type=xsd:int/ element name=varFloat type=xsd:float/ /sequence attribute name=foo/ /complexType element name=myElement type=tns:SOAPStruct/ /schema myElement xmlns=http://soapinterop.org/types xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://soapinterop.org/types test.xsd foo=bar varStringHello/varString varInt5/varInt varFloat3.3/varFloat /myElement I have added a foo attribute to the toplevel element to further illustrate the problem. I have pushed the xsd through XSD2Java, resulting in MyElement.java and SOAPStruct.java. The first problem is that the foo attribute is not modeled anywhere in these two classes. The following code reads the xml file, parses it to a MyElement instance, and then creates an OMElement of it, just as in the howto: XMLStreamReader reader = XMLInputFactory.newInstance(). createXMLStreamReader(new FileReader(test.xml)); MyElement elt = MyElement.Factory.parse(reader); XMLStreamReader r = elt.getPullParser(null); OMElement omElt = new StAXOMBuilder(r).getDocumentElement(); System.out.println(omElt); The output reads varString xmlns=http://soapinterop.org/typesHello/varString What I expect to see (and actually need) is the full xml - not just the first sub element. Is the shown behaviour normal? If so, what do I need to do to get an OMElement that represents the full xml document? Thanks, Tom --- Tom van den Berge Java Architect ACI Worldwide Antwerpseweg 1 PO Box 867, 2800 AW Gouda, the Netherlands +31 182 691 917
Re: [Axis 2][1.0] RPCMessageReceiver with Document/Literal
Hi Suyoug; It seems to me that this is a bug in Axis2 need to fix before next release, can u please create JIRA so that we will not forget to fix this Suyog Gandhi wrote: Basically to summerize my problem, 1) I wrote my simple Java class which has few public methods, which returns some complex type objects. 2) I wrote my service.xml with RPCMessageReceiver, cause RAWMessageReceivers will not generate WSDL for me. 3) I deployed the service. 4) Now I generated client-stub by using 2 different data bindings. ( And wrote corresponding clients to test). - xmlbean : Server side has returned my call properly. While unmarshalling, client-stub gives me Data Binding error caused by document element namespace mismatch exception. - ADB : Server side has returned my call properly. While unmarshalling, client-stub gives me NullPointerException. I have not tried another data bindings. I hope the problem is clear, and somebody can make sense out of it to provide me with solution. Thanks Regards, Suyog -Original Message- From: Suyog Gandhi [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 5:27 PM To: axis-user@ws.apache.org Subject: RE: [Axis 2][1.0] RPCMessageReceiver with Document/Literal Some more info: Now I used following code to create client stub: ( ADB databinding, in previous case I was using xmlbeans data binding) C:\WebService\WS_MDSClient2c:\axis2_1.0\bin\WSDL2Java -p com.vistaar.clemenza.shared.webs.stub -uri http://sgandhi2-d:8100/vistaar/services/WS_MDS32 WSDL sholdn't be different, but I am attaching it again. Also attaching new Client. Client Console Log: C:\Program Files\Java\jdk1.5.0_05\bin\java -Didea.launcher.port=7533 -Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 5.1\bin -Dfile.encoding=windows-1252 -classpath C:\Program Files\Java\jdk1.5.0_05\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunpkcs11.jar;C:\WebService\WS_MDS32C lient\classes;C:\axis2_1.0\lib\axiom-api-1.0.jar;C:\axis2_1.0\lib\axiom- impl-1.0.jar;C:\axis2_1.0\lib\jaxme2-0.5.1.jar;C:\axis2_1.0\lib\geronimo -spec-jms-1.1-rc4.jar;C:\axis2_1.0\lib\neethi-1.0.1.jar;C:\axis2_1.0\lib \jaxmejs-0.5.1.jar;C:\axis2_1.0\lib\axis2-jibx-1.0.jar;C:\axis2_1.0\lib\ jaxen-1.1-beta-8.jar;C:\axis2_1.0\lib\geronimo-spec-javamail-1.3.1-rc5.j ar;C:\axis2_1.0\lib\jaxmexs-0.5.1.jar;C:\axis2_1.0\lib\wsdl4j-1.5.2.jar; C:\axis2_1.0\lib\axis2-tools-1.0.jar;C:\axis2_1.0\lib\commons-httpclient -3.0.jar;C:\axis2_1.0\lib\backport-util-concurrent-2.1.jar;C:\axis2_1.0\ lib\geronimo-spec-activation-1.0.2-rc4.jar;C:\axis2_1.0\lib\xbean-2.1.0. jar;C:\axis2_1.0\lib\axis2-codegen-1.0.jar;C:\axis2_1.0\lib\servletapi-2 .3.jar;C:\axis2_1.0\lib\XmlSchema-1.0.2.jar;C:\axis2_1.0\lib\commons-cod ec-1.3.jar;C:\axis2_1.0\lib\axis2-xmlbeans-1.0.jar;C:\axis2_1.0\lib\anno gen-0.1.0.jar;C:\axis2_1.0\lib\axis2-kernel-1.0.jar;C:\axis2_1.0\lib\jax meapi-0.5.1.jar;C:\axis2_1.0\lib\stax-api-1.0.jar;C:\axis2_1.0\lib\log4j -1.2.13.jar;C:\axis2_1.0\lib\axis2-adb-1.0.jar;C:\axis2_1.0\lib\axiom-do m-1.0.jar;C:\axis2_1.0\lib\stax-utils-20060501.jar;C:\axis2_1.0\lib\comm ons-logging-1.0.4.jar;C:\axis2_1.0\lib\commons-fileupload-1.0.jar;C:\axi s2_1.0\lib\wstx-asl-2.9.3.jar;C:\Program Files\JetBrains\IntelliJ IDEA 5.1\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain com.vistaar.clemenza.shared.webs.client.WSClient log4j:WARN No appenders could be found for logger (org.apache.axiom.om.impl.builder.StAXOMBuilder). log4j:WARN Please initialize the log4j system properly. Calling ws_init . After ws_init . return value: Container is up Calling refreshMDSProxiesRequest . After refreshMDSProxiesRequest .retur value true returnexample1:getVersion xmlns:example1=http://example1.org/example1;example1:TextAxis2 Version String /example1:Text/example1:getVersion/return Exception in thread main org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:287) at com.vistaar.clemenza.shared.webs.stub.WS_MDS32Stub.getAllDimensionInfo(W S_MDS32Stub.java:1363) at com.vistaar.clemenza.shared.webs.client.WSClient.main(WSClient.java:49) 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)
setting 'holders' or 'sequence'
I am using the Axis source codes - samples\stock codes from Axis setup as a base to start my coding. There are the following codes in the GetQuote.java program: call.setTargetEndpointAddress( url ); call.setOperationName( new QName(urn:xmltoday-delayed-quotes, getQuote) ); call.addParameter( symbol, XMLType.XSD_STRING, ParameterMode.IN ); call.setReturnType( XMLType.XSD_FLOAT ); In this case, symbolXXX/symbol will be sent to the remote web service. I have 2 questions here. 1) How do i add params such that the symbols have children/sequence? i.e. I want to sent symbol as symbol id12/id namexxx/name value999/value /symbol 2) How do i set the return values to more than 1 value? i might need to get a couple of response values from the remote side rather than 1 float value. Are there any examples on the net that i can refer to? thanks in advance. best regards, Jeffrey.
Re: [axis2] Custom security context token
Hi, Encryption and signature based on a SecurityContextToken is being implemented as a part of the WS-Secconv impl. WSS4J already has support for creation sig and encr using a SecurityContextToken (SCT). Have a look at the following test cases [1]. If you follow the above test cases you can see how to build a message to with an SCT and to sign/encr with keys derived from it. Right now the rampart Axis2 module only support features of the WS-Security but next rampart release will come with WS-SecureConversation support. Thanks, Ruchith [1] https://svn.apache.org/repos/asf/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewDK.java [2] https://svn.apache.org/repos/asf/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSCT.java On 5/29/06, Shepherd McIlroy [EMAIL PROTECTED] wrote: Hello, I'm trying to talk to a .NET service that requires messages to be signed and encrypted (using a symetric key created by a custom algorithm). I have .NET client code for this that I would like to duplicate under Java using Axis2 and WSS4J. The .NET client does the following to create a SecurityContextToken: UsernameToken unt = new UsernameToken(user, user); unt.Id = UTID; sct = new SecurityContextToken(unt, SCTIdentifier); sct.KeyBytes = sKey; sct.LifeTime = new Microsoft.Web.Services2.Security.LifeTime(SCTExpires.ToLocalTime()); and then signs and encrypts the message using: service.RequestSoapContext.Security.Tokens.Clear(); service.RequestSoapContext.Security.Elements.Clear(); service.RequestSoapContext.Security.Tokens.Add(sct); service.RequestSoapContext.Security.Elements.Add(new EncryptedData(sct)); service.RequestSoapContext.Security.Elements.Add(new MessageSignature(sct)); Creating the key is not a problem. A method of signing and encrypting SOAP messages in a similar manner using Axis2 and WSS4J is not obvious. How can i create a custom security context token using WSS4J? How can i apply that token to a message sent using Axis2? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis 2][sandesha] The responses concatenate with echostring example
Title: [axis 2][sandesha] The responses concatenate with echostring example Hi everybody ! I am a beginner with axis 2.0, I have tried to run the example echostring with WS-ReliableMessaging (module sandesha) in a JSP page but I got some problems,... When I run the example I got as response the following string : echo1echo2echo3. But if I run it again, even from another computer, I got the response echo1echo2echo3echo1echo2echo3 ! Is it normal ? What should I do to avoid this ? I have added serviceClient.finalizeInvoke(); at the end to release resources. Here is the code I am using : !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD %@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1% %@ page import=java.io.File% %@ page import=javax.xml.namespace.QName% %@ page import=org.apache.axiom.om.OMAbstractFactory% %@ page import=org.apache.axiom.om.OMElement% %@ page import=org.apache.axiom.om.OMFactory% %@ page import=org.apache.axiom.om.OMNamespace% %@ page import=org.apache.axiom.soap.SOAPBody% %@ page import=org.apache.axis2.Constants% %@ page import=org.apache.axis2.addressing.EndpointReference% %@ page import=org.apache.axis2.client.Options% %@ page import=org.apache.axis2.client.ServiceClient% %@ page import=org.apache.axis2.client.async.AsyncResult% %@ page import=org.apache.axis2.client.async.Callback% %@ page import=org.apache.axis2.context.ConfigurationContext% %@ page import=org.apache.axis2.context.ConfigurationContextFactory% %@ page import=org.apache.sandesha2.client.SandeshaClientConstants% META http-equiv=Content-Type content=text/html; charset=ISO-8859-1 META name=GENERATOR content=IBM Software Development Platform META http-equiv=Content-Style-Type content=text/css LINK href=theme/Master.css rel=stylesheet type=text/css TITLEindex.jsp/TITLE /HEAD BODY h1 Test Technique Web Services/h1 h2 AXIS 2.0 Web Service Reliable Messaging Client/h2 PPlacez le contenu ici./P %! private final static String applicationNamespaceName = http://tempuri.org/; private final static String echoString = echoString; private final static String Text = Text; private final static String Sequence = Sequence; private final static String echoStringResponse = echoStringResponse; private final static String EchoStringReturn = EchoStringReturn; private static String toEPR = http://127.0.0.1:9080/axis2/services/RMSampleService; private static String CLIENT_REPO_PATH = c:\\Winprog\\WorkspacesRSA\\WSRMClient; % %! private static OMElement getEchoOMBlock(String text, String sequenceKey) { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,ns1); OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace); OMElement textElem = fac.createOMElement(Text,applicationNamespace); OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace); textElem.setText(text); sequenceElem.setText(sequenceKey); echoStringElement.addChild(textElem); echoStringElement.addChild(sequenceElem); return echoStringElement; } static class TestCallback extends Callback { String name = null; public TestCallback (String name) { this.name = name; } public void onComplete(AsyncResult result) { SOAPBody body = result.getResponseEnvelope().getBody(); OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse)); OMElement echoStringReturnElem = echoStringResponseElem.getFirstChildWithName(new QName (applicationNamespaceName,EchoStringReturn)); String resultStr = echoStringReturnElem.getText(); System.out.println(Callback ' + name + ' got result: + resultStr); } public void onError (Exception e) { System.out.println(Error reported for test call back); e.printStackTrace(); } } % % String axis2_xml = CLIENT_REPO_PATH + File.separator +client_axis2.xml; try{ System.out.println(-- Creation of context); ConfigurationContext configContext = org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml); System.out.println(-- Service client); ServiceClient serviceClient = new ServiceClient (configContext,null); System.out.println(Options); Options clientOptions = new Options (); System.out.println(-- YOP 5); clientOptions.setTo(new EndpointReference(toEPR)); clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP); clientOptions.setUseSeparateListener(true); serviceClient.setOptions(clientOptions); // serviceClient.engageModule(new QName (sandesha2)); // serviceClient.engageModule(new QName (addressing)); System.out.println(-- Set Callback); Callback callback1 = new TestCallback (Callback 1); serviceClient.sendReceiveNonBlocking (getEchoOMBlock(echo1,sequence1),callback1); Callback
Re: missing jar file ???
Hi Maxim, I posted this very same question last November but didn't get any response. If you, or anyone else, figures this out I'd be really interested in the answer as well. Thanks. Richard. maxim wrote: Hello, I would really appreciate if someone will tell me what jar file is missing when I am trying to build Axis 1.4 with Xmlbeans support ( unsder java 1.4.2). compile: [javac] Compiling 4 source files to /home/maxim/software/axis-1_4/build/classes [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:44: package org.xmlsoap.schemas.wsdl does not exist [javac] import org.xmlsoap.schemas.wsdl.DefinitionsDocument; [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:45: package org.xmlsoap.schemas.wsdl does not exist [javac] import org.xmlsoap.schemas.wsdl.TTypes; [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:205: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(String wsdlLocation) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:214: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(File wsdlFile) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:219: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(URL wsdlURL) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:224: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(InputStream wsdlStream) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:216: package DefinitionsDocument does not exist [javac] return DefinitionsDocument.Factory.parse(wsdlFile); [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:221: package DefinitionsDocument does not exist [javac] return DefinitionsDocument.Factory.parse(wsdlURL); [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:226: package DefinitionsDocument does not exist [javac] return DefinitionsDocument.Factory.parse(wsdlStream); [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:257: cannot resolve symbol [javac] symbol : class TTypes [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] TTypes tt = parseWSDL(stream).getDefinitions().getTypesArray(0); [javac] ^ - Thanks, Maxim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] setOperationContext() question
Hi, it seems that is the point. If you have an IN-OUT operation, the in-handler can't save any information into the message context because the out message context is not the same, and thus the informations are lost. If the computational node handles only *one* request at a time, this is not a problem: assuming the in and out handlers are the same, you simply save the in-msg context and gets the informations during the out phase. However, if the computational nodes handles more that one client request at a time, the only solution I see is to correlate the in msg. Id and the out msg. Id. Any suggest is welcome. Thanks, Michele Chathura Herath wrote: Hi Michele , On 5/26/06, Michele Mazzucco [EMAIL PROTECTED] wrote: Hi Chathura, so now my questions are: 1 - What happens if the response doesn't follow the in-out MEP but it is created from scratch by a new ServiceClient?, I think my informations are lost, am I right (but I could save the message context and correlate the request and reply message through message id)? Service client has few methods such as sendreceive, fireandforget, etc and meps are built into those methods. So if you can say which method are you using or paste a piece of code. I could try to clarify things for you. I still do not understand you are trying to do. You shouldn't have to corelate request and responce because such corelation is done inside the ServiceClient using return parameters or callbacks. 2 - What happens if the MEP is in-out? Are the request and reply message context the same? Ok here is a bit of background. for one invocateon there is only *one* Operation Context. Could have many message contexts. If the MEP in in out; then there are two message contexts and one operation context that it will be attached to. Boththe message contexts will return the same operation context object if you call getoperationcontext on both of them. So i believe this answers your second question, which is NO there are two messsage contexts. Thanks, Michele HTH Chathura - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis 1.4] No deserializer for anyType
Hi all, I have already posted this message in the No deserializer for {http://www.w3.org/2001/XMLSchema}anyType; thread. I suppose that since it was a reply to this thread no body has noticed it. I reposted it in new thread because the answers I found in previous threads dose not help me to solve my problem. I suppose that my case is slightly different. Here is my case: First of all I am new in using SOAP and AXIS. I am writing a soap client for a third party server. I tried to generate the stubs using AXIS 1.4 WSDL2Java. The WSDL structure that corresponds to my problem is listed below. But when I execute my test program that call executeSQLQuery I got an exception with No deserializer for {http://www.w3.org/2001/XMLSchema}anyType; message. The SOP query succeeded and the client application got the right answer but the answer is not correctly parsed. It seems like the AXIS generated stubs can't deserialize the xsd:anyType type. I am not sure that I understand correctly what would represent such a type. I suppose tha it should be interpreted as block of character or something like the SQL blob type. In my case the row element whose type is anyType should contain the rows returned by the sql query and may have any number of columns depending on the SQL request itself. For example the answer may be: return row nameSEP0001/name pkid{49465272-5C37-41F8-BD0D-01BAB52D5770}/pkid descriptionAuto 1001/description /row row nameSEP0002/name pkid{1E96EEB5-66F2-4766-A6B7-07D0337A8591}/pkid descriptionAuto 1002/description /row /return Can any body help me get this work? The WSDL structure is: xsd:complexType name=ExecuteSQLQueryReq xsd:complexContent xsd:extension base=axlapi:APIRequest xsd:sequence xsd:element name=sql type=xsd:string nillable=false xsd:annotation xsd:documentationWARNING: SQL Large Text and BLOB columns cannot be fetched along with other columns. A Large Text or BLOB column must be selected in its own SQL query./xsd:documentation /xsd:annotation /xsd:element /xsd:sequence /xsd:extension /xsd:complexContent /xsd:complexType xsd:element name=executeSQLQuery type=axlapi:ExecuteSQLQueryReq nillable=false xsd:annotation xsd:documentationThis API call is used to execute a Structured Query Language query against the database. The sql element would contain the SQL statement. If special characters are required, wrap the SQL command inside a CDATA element./xsd:documentation /xsd:annotation /xsd:element xsd:complexType name=ExecuteSQLQueryRes xsd:complexContent xsd:extension base=axlapi:APIResponse xsd:sequence xsd:element name=return xsd:complexType xsd:sequence xsd:element name=row type=xsd:anyType minOccurs=0 maxOccurs=unbounded xsd:annotation xsd:documentationEach row element can contain any number of sub-elements, each sub-element is a column from that row in the result set./xsd:documentation /xsd:annotation /xsd:element /xsd:sequence /xsd:complexType /xsd:element /xsd:sequence /xsd:extension /xsd:complexContent /xsd:complexType xsd:element name=executeSQLQueryResponse type=axlapi:ExecuteSQLQueryRes xsd:annotation xsd:documentationThe response message to executeSQLQuery. The return element represents the result set, which can contain 0 or more rows of data. Each row can have any number of elements as defined by columns specified in the SQL Query. The name of each sub-element of the row element represents the column name, the value of each sub-element of the row element is the corresponding value of that column in the database./xsd:documentation /xsd:annotation /xsd:element -- View this message in context: http://www.nabble.com/-Axis+1.4-+No+deserializer+for+anyType-t1698308.html#a4608778 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Auto deploying webservices
Hi everybody, I'm developing a framework that will make use of webservices. On of the things that I've been trying to do is to automatically deploy the services when tomcat starts. I tried to use the load-at-startup directive but it didn't work as expected ... Is there a standard way to do this with axis and tomcat? I'm using the latest tomcat and axis 1.3. Thanks in advance, Pedro Silva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] Multithreaded client, performance degradation.
Hi, I've been running a few performance tests on Axis2 to compare it with Axis1. I've found that when I post requests using a multithreaded http client [ that spawns multiple threads each sending a certain number of requests ] , the performance of Axis2 seems to degrade, whereas that of Axis1 seems to be relatively stable when tested using the same client. Here are the figures I have got. Each thread sends 1000 requests. I have measured throughput by measuring the time taken for all the threads to finish and then calculating requests per sec. Axis2(req/sec) Axis1(req/sec) -- --- 10 threads - 1105.530784 545.9761944 20 threads - 635.3480599 556.6025772 30 threads - 411.2374179 550.5108726 40 threads - 215.8165598 570.8683581 Apparently, as the number of threads increases, the performance drops in Axis2 whereas it remains reasonably stable in Axis1. Can someone tell me the reason for this, and is there any way the performance with multiple threads in Axis2 can be made better / stabilized ? My Setup: - Red Hat Enterprise Linux ES release 4 Axis2 version 1.0 Tomcat 5.5.17 jdk 1.5.0_04 Regards, Subramanyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2 1.0] File Encoding causes problem
Environment: JDK 1.4.2 Orion Server 2.0.7 Axis2 1.0 Windows XP Eclipse 3.1 Generating java code from hand coded WSDL file. Problem 1: The WSDL file is encoded with Unicode/UTF-8. The WSDL2Java tool will not recognise this as a valid WSDL file. Changing the file encoding to US-ASCII fixes this error. Problem 2: Generating a server application from a wsdl produces a new wsdl file in the resources folder. This file has Unicode/UTF-8 encoding. When deploying the resulting .aar archive in the Axis2 container the following error is logged: - Invalid service CreateLeasingApplication.aar due to null; nested exception is: java.lang.ClassCastException org.apache.axis2.deployment.DeploymentException: null; nested exception is: java.lang.ClassCastException at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:124) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:620) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:207) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:155) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:199) at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepositary(SchedulerTask.java:61) at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:68) at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:76) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) Caused by: java.lang.ClassCastException at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:159) at org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:140) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:123) at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:91) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:84) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:118) ... 10 more Changing the encoding of this generated wsdl to US-ASCII fixes this error. Both of these errors seems like bugs to me, are they or am I doing something wrong? Håkon -- Antares Gruppen AS Dir.phone: +47 - 23 29 05 75 Mobile: +47 - 911 79 505 http://www.antares.no - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] 1.0 Axis web pages renders page in text/pain instead of text/html
Environment: JDK 1.4.2 Orion Server 2.0.7 Axis2 1.0 Windows XP Eclipse 3.1 Some of the default axis pages when deploying the axis2.war does not display correctly under Firefox (possibly also for other standard compliant browsers). Assuming the server is http://localhost:8080/ then: http://localhost:8080/axis2/is text/html http://localhost:8080/axis2/services/listServices is text/plain http://localhost:8080/axis2/axis2-web/HappyAxis.jsp is text/html http://localhost:8080/axis2/axis2-admin/is text/plain The workaround is to use Internet Exploder. Best regards, Håkon -- Antares Gruppen AS Dir.phone: +47 - 23 29 05 75 Mobile: +47 - 911 79 505 http://www.antares.no - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] 1.0 Axis web pages renders page in text/pain instead of text/html
This is a documented-issue. -Original Message- From: Håkon T Sønderland [mailto:[EMAIL PROTECTED] Sent: Monday, May 29, 2006 7:41 AM To: undisclosed-recipients Subject: [Axis2] 1.0 Axis web pages renders page in text/pain instead of text/html Environment: JDK 1.4.2 Orion Server 2.0.7 Axis2 1.0 Windows XP Eclipse 3.1 Some of the default axis pages when deploying the axis2.war does not display correctly under Firefox (possibly also for other standard compliant browsers). Assuming the server is http://localhost:8080/ then: http://localhost:8080/axis2/is text/html http://localhost:8080/axis2/services/listServices is text/plain http://localhost:8080/axis2/axis2-web/HappyAxis.jsp is text/html http://localhost:8080/axis2/axis2-admin/is text/plain The workaround is to use Internet Exploder. Best regards, Håkon -- Antares Gruppen AS Dir.phone: +47 - 23 29 05 75 Mobile: +47 - 911 79 505 http://www.antares.no - 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: [axis 2][sandesha] The responses concatenate with echostring example
Title: [axis 2][sandesha] The responses concatenate with echostring example I forgot to precise that I get the following warning message when running the JSP : [29/05/06 13:46:07:810 CEST] 65a8aac1 TraceNLS u No message text associated with key WARNING:.Cannot.set.header..Response.already.committed. in bundle com.ibm.ejs.resources.seriousMessages [29/05/06 13:46:07:810 CEST] 65a8aac1 SRTServletRes W WARNING: Cannot set header. Response already committed. I don't know if this warning is important for my problem, can please someone help me ? kinds regards, Michel From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lequim MichelSent: Monday, May 29, 2006 10:22 AMTo: axis-user@ws.apache.orgSubject: [axis 2][sandesha] The responses concatenate with echostring example Hi everybody ! I am a beginner with axis 2.0, I have tried to run the example echostring with WS-ReliableMessaging (module sandesha) in a JSP page but I got some problems,... When I run the example I got as response the following string : "echo1echo2echo3". But if I run it again, even from another computer, I got the response "echo1echo2echo3echo1echo2echo3" ! Is it normal ? What should I do to avoid this ? I have added "serviceClient.finalizeInvoke();" at the end to release resources. Here is the code I am using : !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" HTML HEAD %@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"% %@ page import="java.io.File"% %@ page import="javax.xml.namespace.QName"% %@ page import="org.apache.axiom.om.OMAbstractFactory"% %@ page import="org.apache.axiom.om.OMElement"% %@ page import="org.apache.axiom.om.OMFactory"% %@ page import="org.apache.axiom.om.OMNamespace"% %@ page import="org.apache.axiom.soap.SOAPBody"% %@ page import="org.apache.axis2.Constants"% %@ page import="org.apache.axis2.addressing.EndpointReference"% %@ page import="org.apache.axis2.client.Options"% %@ page import="org.apache.axis2.client.ServiceClient"% %@ page import="org.apache.axis2.client.async.AsyncResult"% %@ page import="org.apache.axis2.client.async.Callback"% %@ page import="org.apache.axis2.context.ConfigurationContext"% %@ page import="org.apache.axis2.context.ConfigurationContextFactory"% %@ page import="org.apache.sandesha2.client.SandeshaClientConstants"% META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" META name="GENERATOR" content="IBM Software Development Platform" META http-equiv="Content-Style-Type" content="text/css" LINK href="theme/Master.css" rel="stylesheet" type="text/css" TITLEindex.jsp/TITLE /HEAD BODY h1 Test Technique Web Services/h1 h2 AXIS 2.0 Web Service Reliable Messaging Client/h2 PPlacez le contenu ici./P %! private final static String applicationNamespaceName = "http://tempuri.org/"; private final static String echoString = "echoString"; private final static String Text = "Text"; private final static String Sequence = "Sequence"; private final static String echoStringResponse = "echoStringResponse"; private final static String EchoStringReturn = "EchoStringReturn"; private static String toEPR = "http://127.0.0.1:9080/axis2/services/RMSampleService"; private static String CLIENT_REPO_PATH = "c:\\Winprog\\WorkspacesRSA\\WSRMClient"; % %! private static OMElement getEchoOMBlock(String text, String sequenceKey) { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,"ns1"); OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace); OMElement textElem = fac.createOMElement(Text,applicationNamespace); OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace); textElem.setText(text); sequenceElem.setText(sequenceKey); echoStringElement.addChild(textElem); echoStringElement.addChild(sequenceElem); return echoStringElement; } static class TestCallback extends Callback { String name = null; public TestCallback (String name) { this.name = name; } public void onComplete(AsyncResult result) { SOAPBody body = result.getResponseEnvelope().getBody(); OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse)); OMElement echoStringReturnElem = echoStringResponseElem.getFirstChildWithName(new QName (applicationNamespaceName,EchoStringReturn)); String resultStr = echoStringReturnElem.getText(); System.out.println("Callback '" + name + "' got result:" + resultStr); } public void onError (Exception e) { System.out.println("Error reported for test call back"); e.printStackTrace(); } } % % String axis2_xml = CLIENT_REPO_PATH + File.separator +"client_axis2.xml"; try{ System.out.println("-- Creation of context"); ConfigurationContext configContext =
WSDL doubt
Is there a way in axis where i can create my xsd seperately in a seperate file instead of having it in the WSDL itself ?
Re: Auto deploying webservices
Hallo Silva, you can use ant to help on this. regards Muthana Original-Nachricht Datum: Mon, 29 May 2006 11:24:45 +0100 Von: Pedro Silva [EMAIL PROTECTED] An: axis-user@ws.apache.org Betreff: Auto deploying webservices #xA Hi everybody, I'm developing a framework that will make use of webservices. On of the things that I've been trying to do is to automatically deploy the services when tomcat starts. I tried to use the load-at-startup directive but it didn't work as expected ... Is there a standard way to do this with axis and tomcat? I'm using the latest tomcat and axis 1.3. Thanks in advance, Pedro Silva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer! Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
axis compile error - package does not exist
Hello, I've a wee problem when trying to generate WSDL with axis for some java i wrote that includes external jars. While it compiles fine anywhere else, for some reason axis won't compile it and i get the following error statement (below). I've checked my classpath and it looks fine (which makes sense given the code compiles nicely elsewhere) but I just can't think of what else to do.any ideas what I'm doing wrong? thanks femke Fault - Error while compiling: C:\workspace\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\CreateTINfromPoints.java AxisFault faultCode: {http://xml.apache.org/axis/}Server.compileError faultSubcode: faultString: Error while compiling: C:\workspace\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\CreateTINfromPoints.java faultActor: faultNode: faultDetail: {}Errors:Error compiling C:\workspace\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\CreateTINfromPoints.java: Line 9, column 24: package jwo.landserf.gui does not exist Line 10, column 28: package jwo.landserf.process does not exist Line 11, column 30: package jwo.landserf.structure does not exist Line 22, column -1: cannot find symbol Line 22, column -1: cannot find symbol Line 25, column -1: cannot find symbol Line 25, column -1: cannot find symbol Line 27, column -1: cannot find symbol Line 27, column -1: cannot find symbol Line 27, column -1: cannot find symbol Line 29, column -1: cannot find symbol Line 0, column 0: 11 errors -- View this message in context: http://www.nabble.com/axis+compile+error+-+package+does+not+exist-t1698718.html#a4609843 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] 1.0 Axis web pages renders page in text/pain instead of text/html
Vaughan, Steve wrote: This is a documented-issue. OK, thanks. Håkon -- Antares Gruppen AS Dir.phone: +47 - 23 29 05 75 Mobile: +47 - 911 79 505 http://www.antares.no - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SOAP With Attachments - MIME Part Content Transfer Encoding
Hi dear Axis Users. I am developing a Service with SOAP with attachments ( axis 2 rel 1.0 ) I dont use MTOM so I prefer retrieve the attachments content by their dataHandlers with the technic showed in the example http://ws.apache.org/axis2/1_0/mtom-guide.html I have some questions about the way Axis Handles the Parts it receives, especially when Content Transfer Encoding is set as a Part Header and not using MTOM. 1. For instance, if I submit a attachment at client side base64 encoded, and specifying Content-Transfer-Encoding = base64 in the Header, the result is not automatically decoded at server side, I must call Base64.decode( ... ) explicitely ). Is it a normal behaviour ? Can we configure the service so it will decode on its own ? 2. I have noticed the same thing with encoding quoted-printable in an attachment : looks like it is up to me to do the decode Work. Is it a normal behaviour ? Or I miss something ? 3. Encoding of the SOAP part of request. The SOAP enveloppe is the first MimePart itself. Here is an example wich uses quoted-printable encoding for the SOAP Body. --=_Part_1_20639876.1146648323575 Content-Type: application/xop+xml; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-ID: /doc-access-soap/process-request ?xml version=3D1.0 encoding=3Dutf-8? soapenv:Envelope xmlns:soapenv=3Dhttp://schemas.xmlsoap.org/soap/envelope= / soapenv:Body xmlns:types=3Dhttp://www.inexbee.com/m2doc/m2doc; processRequest xmlns=3Dhttp://www.inexbee.com/m2doc/m2doc; mailProcessRequest=3D= true ( ... ) /processRequest /soapenv:Body/soapenv:Envelope Such a request cause Axis Exceptions such this one ( release 0.95 ) : It seems the AXIS Api tries to parse XML prior to apply quoted-printable decoding. Is it a good interpretation ? ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;soapenv:Header /soapenv:Bodysoapenv:Faultsoapenv:Codesoapenv:Valuesoapenv:Sender/soapenv:Value/soapenv:Codesoapenv:Reasonsoapenv:Text xml:lang=en-USUnexpected character '3' (code 51); expected a quote character enclosing value for 'version' at [row,col {unknown-source}]: [1,15]; nested exception is: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '3' (code 51); expected a quote character enclosing value for 'version' at [row,col {unknown-source}]: [1,15]/soapenv:Text/soapenv:Reasonsoapenv:DetailException xmlns=org.apache.axis2.AxisFault: Unexpected character '3' (code 51); expected a quote character enclosing value for 'version' at [row,col {unknown-source}]: [1,15]; nested exception is: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '3' (code 51); expected a quote character enclosing value for 'version' at [row,col {unknown-source}]: [1,15] at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:297) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '3' (code 51); expected a quote character enclosing value for 'version' at [row,col {unknown-source}]: [1,15] at com.ctc.wstx.io.InputBootstrapper.reportUnexpectedChar(InputBootstrapper.java:430) at com.ctc.wstx.io.InputBootstrapper.handleEq(InputBootstrapper.java:344) at com.ctc.wstx.io.InputBootstrapper.readXmlVersion(InputBootstrapper.java:243) at
[Axis2] Differences in WSDL files when generating from WSDL
Sorry for all the newbie questions :( Environment: JDK 1.4.2 Orion Server 2.0.7 Axis2 1.0 Windows XP Eclipse 3.1 Generating java code from hand coded WSDL file. The issue is that soap headers disappears from bindings in the file extracted using ?wsdl from the axis2.war. Is this correct behaviour? If so how do the client know that it should send the header? If not, what do I do to get the headers back? Many thanks. The original WSDL file looks like this: binding name=createLeasingApplicationSoapHttp type=tns:createLeasingApplication soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=createLeasingApplication soap:operation style=document soapAction=urn:leasingApplication.web.antares.com/createLeasingApplication/ input soap:body use=literal/ soap:header message=tns:LeasingLogin part=login use=literal/ /input output soap:body use=literal / /output fault name=leasingFault soap:fault name=leasingFault use=literal/ /fault /operation /binding The file generated in the resources folder looks like this (still has the headers): wsdl:binding type=tns:createLeasingApplicationPortType name=createLeasingApplicationSOAP11Binding soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=createLeasingApplication soap:operation style=document soapAction=urn:leasingApplication.web.antares.com/createLeasingApplication/ wsdl:input soap:body namespace=urn:leasingApplication.web.antares.com use=literal/ soap:header use=literal part=login message=tns:LeasingLogin/ /wsdl:input wsdl:output soap:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:output wsdl:fault name=LeasingFault soap:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:fault /wsdl:operation /wsdl:binding wsdl:binding type=tns:createLeasingApplicationPortType name=createLeasingApplicationSOAP12Binding soap12:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=createLeasingApplication soap12:operation style=document soapAction=urn:leasingApplication.web.antares.com/createLeasingApplication/ wsdl:input soap12:body namespace=urn:leasingApplication.web.antares.com use=literal/ soap12:header use=literal part=login message=tns:LeasingLogin/ /wsdl:input wsdl:output soap12:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:output wsdl:fault name=LeasingFault soap12:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:fault /wsdl:operation /wsdl:binding The file retireved using ?wsdl looks like this: wsdl:binding type=tns:createLeasingApplicationPortType name=createLeasingApplicationSOAP11Binding soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=createLeasingApplication soap:operation style=document soapAction=urn:leasingApplication.web.antares.com/createLeasingApplication/ wsdl:input soap:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:input wsdl:output soap:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:output wsdl:fault name=LeasingFault soap:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:fault /wsdl:operation /wsdl:binding wsdl:binding type=tns:createLeasingApplicationPortType name=createLeasingApplicationSOAP12Binding soap12:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=createLeasingApplication soap12:operation style=document soapAction=urn:leasingApplication.web.antares.com/createLeasingApplication/ wsdl:input soap12:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:input wsdl:output soap12:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:output wsdl:fault name=LeasingFault soap12:body namespace=urn:leasingApplication.web.antares.com use=literal/ /wsdl:fault /wsdl:operation /wsdl:binding wsdl:binding type=tns:createLeasingApplicationPortType name=createLeasingApplicationHttpBinding http:binding verb=POST/ wsdl:operation name=createLeasingApplication http:operation location=createLeasingApplication/ wsdl:input mime:content type=text/xml/ /wsdl:input wsdl:output mime:content type=text/xml/ /wsdl:output /wsdl:operation /wsdl:binding Håkon -- Antares Gruppen AS Dir.phone: +47 - 23 29 05 75 Mobile: +47 -
AdminClient question (NullPointerException
Hello everybody, Does anyone know what that is? My portal works under WLS 9.1. Axis 1.1 When I try to deploy my WSRP services with command: java -cp [..]AdminClient -lhttp://localhost:7001/portal/services/ [..]/deploy.wsdd I get the following exception while running it from the portal itself there's no exception. But the matter is that WLS doesn't listen to its 7001 port until finishes deployment of applications so there's no possibility to deploy this deploy.wsdd from portal. -- Processing file C:\work\exo\Projects\v2.x\exo-portlet-container\services\wsrp\api\target\generated\org\exoplatform\services\wsrp\wsdl\deploy.wsdd AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NullPointerException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NullPointerException faultActor: faultNode: faultDetail: java.lang.NullPointerException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169) at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015) at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579) at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinder.java:897) at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:643) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1972) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538) at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) at org.apache.axis.client.Call.invokeEngine(Call.java:2583) at org.apache.axis.client.Call.invoke(Call.java:2553) at org.apache.axis.client.Call.invoke(Call.java:1672) -- Best regards, Roman mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis 1.4] No deserializer for anyType
You must tell Axis how to process this information. Since you have no idea what the returned data will look like, I suggest you tell Axis to take the response and turn it into DOM. Then you can process the XML programmatically. AnneOn 5/29/06, Adnene [EMAIL PROTECTED] wrote: Hi all,I have already posted this message in the No deserializer for{http://www.w3.org/2001/XMLSchema}anyType thread. I suppose that since it was a reply to this thread no body has noticed it.I reposted it in new thread because the answers I found in previousthreads dose not help me to solve my problem. I suppose that my case isslightly different. Here is my case: First of all I am new in using SOAP and AXIS. I am writing a soap client for a third party server. I tried to generatethe stubs using AXIS 1.4 WSDL2Java. The WSDL structure that corresponds to my problem is listed below.But when I execute my test program that call executeSQLQuery I got anexception with No deserializer for{http://www.w3.org/2001/XMLSchema}anyType message. The SOP query succeededand the client application got the right answer but the answer is notcorrectly parsed. It seems like the AXIS generated stubs can't deserializethe xsd:anyType type. I am not sure that I understand correctly what would represent such a type.I suppose tha it should be interpreted as block of character or somethinglike the SQL blob type. In my case the row element whose type is anyType should contain the rows returned by the sql query and may have any number ofcolumns depending on the SQL request itself. For example the answer may be:returnrownameSEP0001/name pkid{49465272-5C37-41F8-BD0D-01BAB52D5770}/pkiddescriptionAuto 1001/description/rowrownameSEP0002/namepkid{1E96EEB5-66F2-4766-A6B7-07D0337A8591}/pkid descriptionAuto 1002/description/row/returnCan any body help me get this work?The WSDL structure is: xsd:complexType name=ExecuteSQLQueryReq xsd:complexContentxsd:extension base=axlapi:APIRequestxsd:sequencexsd:element name=sql type=xsd:string nillable=false xsd:annotationxsd:documentationWARNING:SQL Large Text and BLOB columnscannot be fetched along with other columns.A Large Text or BLOB columnmust be selected in its own SQL query./xsd:documentation /xsd:annotation/xsd:element/xsd:sequence/xsd:extension/xsd:complexContent/xsd:complexTypexsd:element name=executeSQLQuery type=axlapi:ExecuteSQLQueryReq nillable=falsexsd:annotationxsd:documentationThis API call is used to execute a Structured QueryLanguage query against the database.The sql element would contain the SQL statement.If special characters are required, wrap the SQL command insidea CDATA element./xsd:documentation/xsd:annotation/xsd:elementxsd:complexType name=ExecuteSQLQueryRes xsd:complexContentxsd:extension base=axlapi:APIResponsexsd:sequencexsd:element name=returnxsd:complexType xsd:sequencexsd:element name=row type=xsd:anyType minOccurs=0maxOccurs=unboundedxsd:annotation xsd:documentationEach row element can contain any numberof sub-elements, each sub-element is a column from that row in the resultset./xsd:documentation/xsd:annotation /xsd:element/xsd:sequence/xsd:complexType/xsd:element/xsd:sequence/xsd:extension/xsd:complexContent /xsd:complexTypexsd:element name=executeSQLQueryResponsetype=axlapi:ExecuteSQLQueryResxsd:annotationxsd:documentationThe response message to executeSQLQuery.The return element represents the result set, which can contain 0 or more rows of data.Each row can have any number of elements as defined by columns specified inthe SQL Query.The name of each sub-element of the row element represents the column name, the value of each sub-element of the row element is thecorresponding value of that column in the database./xsd:documentation/xsd:annotation/xsd:element--View this message in context: http://www.nabble.com/-Axis+1.4-+No+deserializer+for+anyType-t1698308.html#a4608778Sent from the Axis - User forum at Nabble.com.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Problem with 'httpChunkStream = true' through VPN
Hi all, I am using Axis to call webservices storing business objects in Microsoft CRM (works great!!!). I've been developing and calling webservices on a server running local on top of vmware. Now I am trying to call my colleagues development server which I can access through a VPN tunnel ... But it fails. I get the following exception: java.net.SocketException: Connection reset Cool, so I started digging and found that I don't get this exception when setting 'httpChunkStream = false'. This is the testcode: HttpClient httpClient = new HttpClient(); Credentials credentials = new NTCredentials(user, pwd, localhost, domain); httpClient.getState().setCredentials(AuthScope.ANY, credentials); HttpMethodBase method = new PostMethod(http://localhost/mscrmservices/2006/crmservice.asmx;); Message reqMessage = new Message(test); ((PostMethod)method).setRequestEntity(new MessageRequestEntity(method, reqMessage, false)); try { int returnCode = httpClient.executeMethod(method); String response = method.getResponseBodyAsString(); System.out.println(Response: + response); } catch (HttpException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } How to propagate this property to Axis (I'm using the stub generated by wsdl2java). Thanks. Regards, Kenneth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting 'holders' or 'sequence'
In Java you must define symbol as a bean, and in XML schema, you must define symbol as a complex type. Likewise, you can define the return value to by a bean or an array.Take a look at a few of the more advanced samples. AnneOn 5/29/06, Jeffrey Ng [EMAIL PROTECTED] wrote: I am using the Axis source codes - samples\stock codes from Axis setup as a base to start my coding. There are the following codes in the GetQuote.java program: call.setTargetEndpointAddress( url ); call.setOperationName( new QName(urn:xmltoday-delayed-quotes, getQuote) ); call.addParameter( symbol, XMLType.XSD_STRING, ParameterMode.IN ); call.setReturnType( XMLType.XSD_FLOAT ); In this case, symbolXXX/symbol will be sent to the remote web service. I have 2 questions here. 1) How do i add params such that the symbols have children/sequence? i.e. I want to sent symbol as symbol id12/id namexxx/name value999/value /symbol 2) How do i set the return values to more than 1 value? i might need to get a couple of response values from the remote side rather than 1 float value. Are there any examples on the net that i can refer to? thanks in advance. best regards, Jeffrey.
Re: axis compile error - package does not exist
Did you make sure the jar which contains your jwo.landserf libraries are located on your CLASSPATH? M- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: femke [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, May 29, 2006 7:51 AM Subject: axis compile error - package does not exist Hello, I've a wee problem when trying to generate WSDL with axis for some java i wrote that includes external jars. While it compiles fine anywhere else, for some reason axis won't compile it and i get the following error statement (below). I've checked my classpath and it looks fine (which makes sense given the code compiles nicely elsewhere) but I just can't think of what else to do.any ideas what I'm doing wrong? thanks femke Fault - Error while compiling: C:\workspace\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\CreateTINfromPoints.java AxisFault faultCode: {http://xml.apache.org/axis/}Server.compileError faultSubcode: faultString: Error while compiling: C:\workspace\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\CreateTINfromPoints.java faultActor: faultNode: faultDetail: {}Errors:Error compiling C:\workspace\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\CreateTINfromPoints.java: Line 9, column 24: package jwo.landserf.gui does not exist Line 10, column 28: package jwo.landserf.process does not exist Line 11, column 30: package jwo.landserf.structure does not exist Line 22, column -1: cannot find symbol Line 22, column -1: cannot find symbol Line 25, column -1: cannot find symbol Line 25, column -1: cannot find symbol Line 27, column -1: cannot find symbol Line 27, column -1: cannot find symbol Line 27, column -1: cannot find symbol Line 29, column -1: cannot find symbol Line 0, column 0: 11 errors -- View this message in context: http://www.nabble.com/axis+compile+error+-+package+does+not+exist-t1698718.html#a4609843 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Complex type problem
Roy,The problem is that the ns namespace declaration is not in scope for the parameter element. Change the parameter definition to this and see if it works: parameter qname=pns:reqData xmlns:pns= http://test.com/ejb/ type= pns:RequestData xmlns:tns=http://www.w3.org/2001/XMLSchema /Anne On 5/29/06, Roy [EMAIL PROTECTED] wrote: Dear Anne,I think that i have declared it here: beanMapping xmlns:ns= http://ejb.test.com/rd qname=ns:RequestData languageSpecificType=java:com.test.ejb.rd.RequestData/I tried to set my complex type only with a String ant an int var. It worked. I tried it with 2 Strings and both Strings take the same value (the value of the first string) when i call the service. In the Soap monitor i can see that both string are sent with different values. Have you ever any similar problems? Anne Thomas Manes [EMAIL PROTECTED] έγραψε: Roy,You have an error in your WSDD:parameter qname=pns:reqData xmlns:pns= http://test.com/ejb/ type=ns:RequestData xmlns:tns= http://www.w3.org/2001/XMLSchema /You have not declared the ns namespace.AnneOn 5/26/06, Suyog Gandhi [EMAIL PROTECTED] wrote: Check out the issue AXIS2-770 , may be it is realted to this. I faced problems about serialization of complex types. 2nd level of nesting is not working. Once I re-structure wsdl for only 1 level of nesting, it started working. e.gfollowing complex type does NOTwork: ( Gives null for Name and Value for the attributes. ) WMemberInfo ---|- ID ---|- Attrbutes [] -|- Name -|- Value Following complex type works. WMemberInfo |- ID |- Attr1Name |- Attr1 Value |- Attr2 Name |- Attr2 Value But this is a crude workaround till the time problem is fixed. Hope this helps. Suyog -Original Message-From: robert lazarski [mailto: [EMAIL PROTECTED]]Sent: Friday, May 26, 2006 9:36 AMTo: axis-user@ws.apache.org Subject: Re: Complex type problem The other thing is make sure your vendor supports wsdl2java -jboss does not, for example (although they run a modified version of axis 1.2internally). The problem I had was similair, although IIRC correctly I wasgetting ser / deser errors, not null. It was working on simple types butfailing on complex ones. HTH,Robert http://www.braziloutsource.com/ On 5/26/06, Roy[EMAIL PROTECTED] wrote: I think that this is not exactly my problem. I can call normally the service from my client when i use simple types. When i try to pass complex types i face the problem. robert lazarski [EMAIL PROTECTED] έγραψε: You'retrying to use a non-ejb client to connect to a Web Service that implementsimplements SessionBean, is that correct? The only way I got that to work -using jboss - was something like...// remote ejb / webserviceprivate CallCentreWebEndpointendpoint;String wsdl_loc = http://localhost:8080/CallCentreWebServiceJAR?wsdl;// generated by JSWDP wscompile, which jboss insists onusing URL mappinglocation =ClassLoader.getSystemResource(CallCentreWeb_Mapping.xml);assertNotNull(mappinglocation);// bean mappingURL ws4eeMetaData =ClassLoader.getSystemResource(ws4ee-deploy.xml);assertNotNull(ws4eeMetaData);QName qname = new QName( http://localhost/callcentreweb,CallCentreWebService); URL url ="" newURL(wsdl_loc);org.jboss.webservice.client.ServiceFactoryImpl factory=(org.jboss.webservice.client.ServiceFactoryImpl) ServiceFactoryImpl.newInstance();javax.xml.rpc.Service service = factory.createService(url,mappinglocation, ws4eeMetaData, qname,null);endpoint = (CallCentreWebEndpoint) service.getPort(CallCentreWebEndpoint.class);The main idea here isServiceFactoryImpl, which varies by vendor. This may not be your problem,but thought I'd post it in case it helps. HTH, Roberthttp://www.braziloutsource.com/ On 5/26/06, Roy[EMAIL PROTECTED] wrote:I tried the beanmapping too but it didn't work. This is the the complex type i want to send and the deploy.wsdd file:Deploy.wsdd:deployment xmlns=http://xml.apache.org/axis/wsdd/ xmlns:java= http://xml.apache.org/axis/wsdd/providers/java service name=EJBTestService provider=java:EJBparameter name=wsdlTargetNamespace value= http://ejb.test.com/ parameter name=beanJndiName value=ejb/TestService/parameter name=homeInterfaceName value= com.test.ejb.TestServiceHome/ parameter name=remoteInterfaceName value= com.test.ejb.TestService/parameter name=allowedMethods value=*/ operation name=sendData qname=operNS:SendData xmlns:operNS= http://test.com/ejb/
Re: WSDL doubt
Yes, You can import and reference types or element in the schema. Below shown an example of how to import a schema under the namespace http://corp.net/configuration; and how to reference a element in that schema. wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://corp.net/ConfigManager; xmlns:conf=http://corp.net/configuration; name=ConfigManager !--snip -- wsdl:types xs:schema targetNamespace=http://corp.net/ConfigManager/getConfigurations; elementFormDefault=qualified xs:import namespace=http://corp.net/configuration; schemaLocation=../schemas/config.xsd / xs:element name=getConfigurationsResponse xs:complexType xs:sequence xs:element ref=conf:config minOccurs=1 maxOccurs=1 / /xs:sequence /xs:complexType /xs:element /xs:schema /wsdl:types Regards, Marcus Ludvigson On 5/29/06, Hariharasudhan.D Dhakshinamoorthy [EMAIL PROTECTED] wrote: Is there a way in axis where i can create my xsd seperately in a seperate file instead of having it in the WSDL itself ?
Re: [Axis 1.4] No deserializer for anyType
Thank you Anne For your quick answer, Since I am new with Axis and SOAP, do you have any reference or documentation to point me to, so I can find out the way to tell Axis how to process this information? An example would of a great help for me. Thank you again for precious help, Adnene -- View this message in context: http://www.nabble.com/-Axis+1.4-+No+deserializer+for+anyType-t1698308.html#a4611715 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Complex type problem
Anna,Thank you a lot for your help.I tried it and i get another error :-). The client can't deserialize correctly the response. I send a request with a RequestData object with this data (x = "Hello", y="User" , num = 10). In the client the object has these values:x="Hello"y="Hello'num=10I tried with 3 and four strings and i get the same results (All string variables get the value of the first String). In the monitor i can see that the request has the right values for each string var.Do you know why this is happening?Thank you,RoyAnne Thomas Manes [EMAIL PROTECTED] wrote: Roy,The problem is that the "ns" namespace declaration is not in scope for the parameter element. Change the parameter definition to this and see if it works: parameter qname="pns:reqData" xmlns:pns=" http://test.com/ejb/" type=" pns:RequestData" xmlns:tns="http://www.w3.org/2001/XMLSchema " /Anne On 5/29/06, Roy [EMAIL PROTECTED] wrote: Dear Anne,I think that i have declared it here: beanMapping xmlns:ns=" http://ejb.test.com/rd" qname="ns:RequestData" languageSpecificType="java:com.test.ejb.rd.RequestData"/I tried to set my complex type only with a String ant an int var. It worked. I tried it with 2 Strings and both Strings take the same value (the value of the first string) when i call the service. In the Soap monitor i can see that both string are sent with different values. Have you ever any similar problems? Anne Thomas Manes [EMAIL PROTECTED] έγραψε: Roy,You have an error in your WSDD:parameter qname="pns:reqData" xmlns:pns=" http://test.com/ejb/" type="ns:RequestData" xmlns:tns=" http://www.w3.org/2001/XMLSchema " /You have not declared the "ns" namespace.AnneOn 5/26/06, Suyog Gandhi [EMAIL PROTECTED] wrote:Check out the issue AXIS2-770 , may be it is realted to this. I faced problems about serialization of complex types. 2nd level of nesting is not working. Once I re-structure wsdl for only 1 level of nesting, it started working. e.gfollowing complex type does NOTwork: ( Gives null for Name and Value for the attributes. ) WMemberInfo ---|- ID ---|- Attrbutes [] -|- Name -|- Value Following complex type works. WMemberInfo |- ID |- Attr1Name |- Attr1 Value |- Attr2 Name |- Attr2 Value But this is a crude workaround till the time problem is fixed.Hope this helps. Suyog -Original Message-From: robert lazarski [mailto: [EMAIL PROTECTED]]Sent: Friday, May 26, 2006 9:36 AMTo: axis-user@ws.apache.org Subject: Re: Complex type problem The other thing is make sure your vendor supports wsdl2java -jboss does not, for example (although they run a modified version of axis 1.2internally). The problem I had was similair, although IIRC correctly I wasgetting ser / deser errors, not null. It was working on simple types butfailing on complex ones. HTH,Robert http://www.braziloutsource.com/On 5/26/06, Roy[EMAIL PROTECTED] wrote: I think that this is not exactly my problem. I can call normally the service from my client when i use simple types. When i try to pass complex types i face the problem. robert lazarski [EMAIL PROTECTED] έγραψε:You'retrying to use a non-ejb client to connect to a Web Service that implementsimplements SessionBean, is that correct? The only way I got that to work -using jboss - was something like...// remote ejb / webserviceprivate CallCentreWebEndpointendpoint;String wsdl_loc = " http://localhost:8080/CallCentreWebServiceJAR?wsdl";// generated by JSWDP wscompile, which jboss insists onusing URL mappinglocation =ClassLoader.getSystemResource("CallCentreWeb_Mapping.xml"); assertNotNull(mappinglocation);// bean mappingURL ws4eeMetaData =ClassLoader.getSystemResource("ws4ee-deploy.xml");assertNotNull(ws4eeMetaData);QName qname = new QName(" http://localhost/callcentreweb","CallCentreWebService"); URL url ="" newURL(wsdl_loc); org.jboss.webservice.client.ServiceFactoryImpl factory=(org.jboss.webservice.client.ServiceFactoryImpl) ServiceFactoryImpl.newInstance();javax.xml.rpc.Service service = factory.createService(url,mappinglocation, ws4eeMetaData, qname,null);endpoint = (CallCentreWebEndpoint) service.getPort(CallCentreWebEndpoint.class);The main idea here isServiceFactoryImpl, which varies by vendor. This may not be your problem,but thought I'd post it in case it helps. HTH, Roberthttp://www.braziloutsource.com/ On 5/26/06, Roy[EMAIL PROTECTED] wrote:I tried the beanmapping too but it didn't work. This is the the complex type i want to send and the deploy.wsdd file:Deploy.wsdd:deployment
Re: Re: [Axis2] Pls help ---- about using stub to writing echoStringclient.
hey Martin, What do you mean by 1.0? I am using Axis2 1.0, is there v1.3 out for Axis2 ? I am actually experimenting using stub (generated by WSDL2Java) to write the client, echoString is just a simple example I started with Do you have any idea where I might find some resources about using stub to writing client ? thanks, Jenny 2006-05-29 === 2006-05-29 08:54:23 you wrote:=== Is there a reason why you are using Axis 1.0 instead of 1.3? The new 1.3 uses class org.soapinterop.EchoString and the specific method call is org.soapinterop.EchoString(java.lang.String) M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Jenny ZHANG [EMAIL PROTECTED] To: axis-user axis-user@ws.apache.org Sent: Sunday, May 28, 2006 1:41 PM Subject: [Axis2] Pls help about using stub to writing echoStringclient. Hey, I used WSDL2Java to generate a stub for Axis2SampleDocLitService.aar as instructed in user's manual. and then tried to use the stub to write a simple client .java for its echoString operation (the codes are attached) , however, when I compiled it, it said [javac] C:\Apache\Axis2-std-1.0\samples\src\src\echoStringClient.java:24: cannot apply org.apache.axis2.userguide.Axis2SampleDocLitServiceStub's echoString(org .apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringParam) to (or g.apache.axis2.userguide.xsd.EchoStringParamDocument) Could anyone please tell me what's wrong with the codes? Thanks ! Jenny [EMAIL PROTECTED] 2006-05-29 -- import org.apache.axis2.userguide.xsd.EchoStringParamDocument; import org.apache.axis2.userguide.xsd.EchoStringParamDocument.*; import org.apache.axis2.userguide.xsd.EchoStringReturnDocument; import org.apache.axis2.userguide.xsd.EchoStringReturnDocument.*; import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub; import org.apache.axis2.addressing.EndpointReference; public class echoStringClient { private static EndpointReference targetEPR = new EndpointReference(http://127.0.0.1:8080/axis2/services/Axis2SampleDocLitService;); public static void main(String[] args) { try { //Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME Axis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService;); //Create the request document to be sent. EchoStringParamDocument reqDoc= EchoStringParamDocument.Factory.newInstance(); reqDoc.setEchoStringParam(Axis2 Echo); //invokes the Web service. EchoStringReturnDocument resDoc=stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = = = = = = = = = = = =
Re: [Axis2] Multithreaded client, performance degradation.
Out of interest - are you requesting the same server. And if so, is the requests using the same socket ? Med venlig hilsen / Kind regards, Morten Steffensen Emercos ApS http://www.emercos.com Ramanathan, Subramanyam skrev: Hi, I've been running a few performance tests on Axis2 to compare it with Axis1. I've found that when I post requests using a multithreaded http client [ that spawns multiple threads each sending a certain number of requests ] , the performance of Axis2 seems to degrade, whereas that of Axis1 seems to be relatively stable when tested using the same client. Here are the figures I have got. Each thread sends 1000 requests. I have measured throughput by measuring the time taken for all the threads to finish and then calculating requests per sec. Axis2(req/sec) Axis1(req/sec) -- --- 10 threads - 1105.530784 545.9761944 20 threads - 635.3480599 556.6025772 30 threads - 411.2374179 550.5108726 40 threads - 215.8165598 570.8683581 Apparently, as the number of threads increases, the performance drops in Axis2 whereas it remains reasonably stable in Axis1. Can someone tell me the reason for this, and is there any way the performance with multiple threads in Axis2 can be made better / stabilized ? My Setup: - Red Hat Enterprise Linux ES release 4 Axis2 version 1.0 Tomcat 5.5.17 jdk 1.5.0_04 Regards, Subramanyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Med venlig hilsen / Kind regards, Morten Steffensen Emercos ApS http://www.emercos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with 'httpChunkStream = true' through VPN
Good Morning Ken- good news you have been able to determine the workaround.. for configuring the chunking capability you will need to set the HTTP transport version back to 1.0 Service service = new Service(); //A new axis Service. Call call = (Call) service.createCall(); //Create a call to the service. /*Un comment the below statement to do HTTP/1.1 protocol (to enable chunking..)*/ //call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION,HTTPConstants.HEADER_PROTOCOL_V11); //Hashtable myhttp = new Hashtable(); //myhttp.put(, yyy); //Send extra soap headers //myhttp.put(SOAPAction, dyyy); //myhttp.put(SOAPActions, prova); /*Un comment the below to do http chunking to avoid the need to calculate content-length. (Needs HTTP/1.1)*/ //myhttp.put(HTTPConstants.HEADER_TRANSFER_ENCODING, HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED); //this option will disable chunking.. call.setScopedProperty(MessageContext.HTTP_TRANSPOR_VERSION,HttpConstants.HEADER_PROTOCOL_V10); HTH Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Westelinck, Kenneth [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, May 29, 2006 9:45 AM Subject: Problem with 'httpChunkStream = true' through VPN Hi all, I am using Axis to call webservices storing business objects in Microsoft CRM (works great!!!). I've been developing and calling webservices on a server running local on top of vmware. Now I am trying to call my colleagues development server which I can access through a VPN tunnel ... But it fails. I get the following exception: java.net.SocketException: Connection reset Cool, so I started digging and found that I don't get this exception when setting 'httpChunkStream = false'. This is the testcode: HttpClient httpClient = new HttpClient(); Credentials credentials = new NTCredentials(user, pwd, localhost, domain); httpClient.getState().setCredentials(AuthScope.ANY, credentials); HttpMethodBase method = new PostMethod(http://localhost/mscrmservices/2006/crmservice.asmx;); Message reqMessage = new Message(test); ((PostMethod)method).setRequestEntity(new MessageRequestEntity(method, reqMessage, false)); try { int returnCode = httpClient.executeMethod(method); String response = method.getResponseBodyAsString(); System.out.println(Response: + response); } catch (HttpException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } How to propagate this property to Axis (I'm using the stub generated by wsdl2java). Thanks. Regards, Kenneth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Multithreaded client, performance degradation.
Subramanyam, I am just now running a jmeter based multithreaded test with 1,5,50,100,200 threads and i *definitely* don't see what u are seeing. Could u please create a JIRA issue and upload both your service and client code? -- dims On 5/29/06, Ramanathan, Subramanyam [EMAIL PROTECTED] wrote: Hi, I've been running a few performance tests on Axis2 to compare it with Axis1. I've found that when I post requests using a multithreaded http client [ that spawns multiple threads each sending a certain number of requests ] , the performance of Axis2 seems to degrade, whereas that of Axis1 seems to be relatively stable when tested using the same client. Here are the figures I have got. Each thread sends 1000 requests. I have measured throughput by measuring the time taken for all the threads to finish and then calculating requests per sec. Axis2(req/sec) Axis1(req/sec) -- --- 10 threads - 1105.530784 545.9761944 20 threads - 635.3480599 556.6025772 30 threads - 411.2374179 550.5108726 40 threads - 215.8165598 570.8683581 Apparently, as the number of threads increases, the performance drops in Axis2 whereas it remains reasonably stable in Axis1. Can someone tell me the reason for this, and is there any way the performance with multiple threads in Axis2 can be made better / stabilized ? My Setup: - Red Hat Enterprise Linux ES release 4 Axis2 version 1.0 Tomcat 5.5.17 jdk 1.5.0_04 Regards, Subramanyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: Re: [Axis2] Pls help ---- about using stub to writing echoStringclient.
If my understanding of the situation is correct The user has a provider of type 'Msg' and is unable to generate the required Stubs with WSDL2Java Could you elaborate on your response that -d xmlbeans will solve this? Thanks, Martin - * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Ajith Ranabahu [EMAIL PROTECTED] To: axis-user@ws.apache.org; [EMAIL PROTECTED] Sent: Monday, May 29, 2006 10:30 AM Subject: Re: Re: [Axis2] Pls help about using stub to writing echoStringclient. Hi Jenny, Seems you've mixed up the databinding frameworks. try codegenerating with -d xmlbeans flag Ajith On 5/29/06, Jenny ZHANG [EMAIL PROTECTED] wrote: hey Martin, What do you mean by 1.0? I am using Axis2 1.0, is there v1.3 out for Axis2 ? I am actually experimenting using stub (generated by WSDL2Java) to write the client, echoString is just a simple example I started with Do you have any idea where I might find some resources about using stub to writing client ? thanks, Jenny 2006-05-29 === 2006-05-29 08:54:23 you wrote:=== Is there a reason why you are using Axis 1.0 instead of 1.3? The new 1.3 uses class org.soapinterop.EchoString and the specific method call is org.soapinterop.EchoString(java.lang.String) M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Jenny ZHANG [EMAIL PROTECTED] To: axis-user axis-user@ws.apache.org Sent: Sunday, May 28, 2006 1:41 PM Subject: [Axis2] Pls help about using stub to writing echoStringclient. Hey, I used WSDL2Java to generate a stub for Axis2SampleDocLitService.aar as instructed in user's manual. and then tried to use the stub to write a simple client .java for its echoString operation (the codes are attached) , however, when I compiled it, it said [javac] C:\Apache\Axis2-std-1.0\samples\src\src\echoStringClient.java:24: cannot apply org.apache.axis2.userguide.Axis2SampleDocLitServiceStub's echoString(org .apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringParam) to (or g.apache.axis2.userguide.xsd.EchoStringParamDocument) Could anyone please tell me what's wrong with the codes? Thanks ! Jenny [EMAIL PROTECTED] 2006-05-29 -- import org.apache.axis2.userguide.xsd.EchoStringParamDocument; import org.apache.axis2.userguide.xsd.EchoStringParamDocument.*; import org.apache.axis2.userguide.xsd.EchoStringReturnDocument; import org.apache.axis2.userguide.xsd.EchoStringReturnDocument.*; import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub; import org.apache.axis2.addressing.EndpointReference; public class echoStringClient { private static EndpointReference targetEPR = new EndpointReference(http://127.0.0.1:8080/axis2/services/Axis2SampleDocLitService;); public static void main(String[] args) { try { //Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME Axis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService;); //Create the request document to be sent. EchoStringParamDocument reqDoc= EchoStringParamDocument.Factory.newInstance(); reqDoc.setEchoStringParam(Axis2 Echo); //invokes the Web service. EchoStringReturnDocument resDoc=stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = = = = = = = = = = = = -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Namespace Issue
Hi, Looks like there is some problem in the way namespaces are handled. Here is the summary of the issue. I created an xsd file that contains two complex types A and B. In the complex type B, I create an element of type A. elementFormdefault attribute is set to false. Inside my wsdl, I import this xsd file Where ns1=http://sample.com/test xsd:complexType name=A xsd:sequence xsd:element name=name type=xsd:string/xsd:element xsd:element name=description type=xsd:string/xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=B xsd:sequence xsd:element name=resource type=ns1:A minOccurs=1 maxOccurs=1 /xsd:element xsd:element name=details type=xsd:string minOccurs=1 maxOccurs=unbounded / /xsd:sequence /xsd:complexType When I try to create an element BElement of type B, I was expecting output to be Response: 1 [correct] BElement xmlns=http://sample.com/test resource xmlns= nameTest/name descriptiondesc/description / resource details xmlns=some details/details / BElement Instead the ouput looks like Response: 2 [wrong] BElement xmlns=http://sample.com/test resource nameTest/name descriptiondesc/description / resource detailssome details/details / BElement Since elementFormDefault attribute is set to false, all locally defined elements [resource, details] should belong to empty namespace. If debugged through the code while constructing the response everything looks fine, but the actual response I get (confirmed with the SOAPMonitor utilty] looks like Response: 2 above. Let me know if I am missing something. Thanks Venkat
RE: Namespace Issue
elementFormdefault attribute is set to false should actually be elementFormDefault attribute is set to unqualified From: Venkat Gyambavantha Sent: Monday, May 29, 2006 1:01 PM To: 'axis-user@ws.apache.org' Subject: Namespace Issue Hi, Looks like there is some problem in the way namespaces are handled. Here is the summary of the issue. I created an xsd file that contains two complex types A and B. In the complex type B, I create an element of type A. elementFormdefault attribute is set to false. Inside my wsdl, I import this xsd file Where ns1=http://sample.com/test xsd:complexType name=A xsd:sequence xsd:element name=name type=xsd:string/xsd:element xsd:element name=description type=xsd:string/xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=B xsd:sequence xsd:element name=resource type=ns1:A minOccurs=1 maxOccurs=1 /xsd:element xsd:element name=details type=xsd:string minOccurs=1 maxOccurs=unbounded / /xsd:sequence /xsd:complexType When I try to create an element BElement of type B, I was expecting output to be Response: 1 [correct] BElement xmlns=http://sample.com/test resource xmlns= nameTest/name descriptiondesc/description / resource details xmlns=some details/details / BElement Instead the ouput looks like Response: 2 [wrong] BElement xmlns=http://sample.com/test resource nameTest/name descriptiondesc/description / resource detailssome details/details / BElement Since elementFormDefault attribute is set to false, all locally defined elements [resource, details] should belong to empty namespace. If debugged through the code while constructing the response everything looks fine, but the actual response I get (confirmed with the SOAPMonitor utilty] looks like Response: 2 above. Let me know if I am missing something. Thanks Venkat
Re: Deploying Web services with Axis 1.3
Hi Dies, Thanks for that! Replacing the exceptions with catching throwables gave me the clue I needed to work out the problem. I didn't have some other classes in the classpath for Tomcat, but I did for the Eclipse project. So it worked there, but not in Tomcat. Fixed now tho :-) Cheers, - Michael -- View this message in context: http://www.nabble.com/Deploying+Web+services+with+Axis+1.3-t1672497.html#a4619505 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use Axis 1.x and Axis 2.0 for Digest Authentication
Hi All, I want to use Digest Authentication using Axis. Please let me know some good articles or code on how to do it using Axis 1.x and Axis 2.0. Regards Ananya Bhushan The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
RE: [axis2] Custom security context token
Title: RE: [axis2] Custom security context token Thanks, Ruchith. There's one issue though: The .NET code is creating a SecurityContextToken with a UsernameToken as its base. Is there any way to do this with WSS4J? (Or is it maybe unnecessary?) The MSDN documentation for this constructor says Initializes a new instance of the SecurityContextToken class using the security token used to sign the Request Security Token (RST), the security token shared by the security token service and the target Web service, and the specified identifier. I'm not quite sure that means. Also, how hard would it be to use this code with Axis2? Thanks again -Original Message- From: Ruchith Fernando [mailto:[EMAIL PROTECTED]] Sent: Mon 5/29/2006 2:19 AM To: axis-user@ws.apache.org Subject: Re: [axis2] Custom security context token Hi, Encryption and signature based on a SecurityContextToken is being implemented as a part of the WS-Secconv impl. WSS4J already has support for creation sig and encr using a SecurityContextToken (SCT). Have a look at the following test cases [1]. If you follow the above test cases you can see how to build a message to with an SCT and to sign/encr with keys derived from it. Right now the rampart Axis2 module only support features of the WS-Security but next rampart release will come with WS-SecureConversation support. Thanks, Ruchith [1] https://svn.apache.org/repos/asf/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewDK.java [2] https://svn.apache.org/repos/asf/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSCT.java On 5/29/06, Shepherd McIlroy [EMAIL PROTECTED] wrote: Hello, I'm trying to talk to a .NET service that requires messages to be signed and encrypted (using a symetric key created by a custom algorithm). I have .NET client code for this that I would like to duplicate under Java using Axis2 and WSS4J. The .NET client does the following to create a SecurityContextToken: UsernameToken unt = new UsernameToken(user, user); unt.Id = UTID; sct = new SecurityContextToken(unt, SCTIdentifier); sct.KeyBytes = sKey; sct.LifeTime = new Microsoft.Web.Services2.Security.LifeTime(SCTExpires.ToLocalTime()); and then signs and encrypts the message using: service.RequestSoapContext.Security.Tokens.Clear(); service.RequestSoapContext.Security.Elements.Clear(); service.RequestSoapContext.Security.Tokens.Add(sct); service.RequestSoapContext.Security.Elements.Add(new EncryptedData(sct)); service.RequestSoapContext.Security.Elements.Add(new MessageSignature(sct)); Creating the key is not a problem. A method of signing and encrypting SOAP messages in a similar manner using Axis2 and WSS4J is not obvious. How can i create a custom security context token using WSS4J? How can i apply that token to a message sent using Axis2? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SOAP With Attachments - MIME Part Content Transfer Encoding
Moving the conversation over to Axis2-dev list...Please post your replies to dev list.. Hi Laurent and devs, Currently [1],[2]are the intended behavior. Do you have a use case which makes it mandatory to send the base64 as an attachment, without embedding in the SOAP message... I'm not sure whether we need to support the [3]. On the other hand we use java mail to parse the contents inside the mime part(Contents after ripping off the boundaries). IMHO java mail should parse it if the encoding is intended to be decoded... Thoughts ~Thilina On 5/29/06, Laurent CELLA [EMAIL PROTECTED] wrote: Hi dear Axis Users.I am developing a Service with SOAP with attachments ( axis 2 rel 1.0 )I dont use MTOM so I prefer retrieve the attachments content by their dataHandlers with the technic showed in the examplehttp://ws.apache.org/axis2/1_0/mtom-guide.htmlI have some questions about the way Axis Handles the Parts it receives, especially when Content Transfer Encoding is set as a Part Header andnot using MTOM.1.For instance, if I submit a attachment at client side base64 encoded,and specifying Content-Transfer-Encoding = base64 in the Header, the result is not automatically decoded at server side, I must callBase64.decode( ... ) explicitely ).Is it a normal behaviour ? Can we configure the service so it willdecode on its own ? 2.I have noticed the same thing with encoding quoted-printable in anattachment : looks like it is up to me to do the decode Work. Is it a normal behaviour ? Or I miss something ?3.Encoding of the SOAP part of request.The SOAP enveloppe is the first MimePart itself.Here is an example wich uses quoted-printable encoding for the SOAP Body. --=_Part_1_20639876.1146648323575Content-Type: application/xop+xml; charset=utf-8Content-Transfer-Encoding: quoted-printableContent-ID: /doc-access-soap/process-request?xml version=3D 1.0 encoding=3Dutf-8?soapenv:Envelope xmlns:soapenv=3Dhttp://schemas.xmlsoap.org/soap/envelope=/soapenv:Body xmlns:types=3D http://www.inexbee.com/m2doc/m2docprocessRequest xmlns=3Dhttp://www.inexbee.com/m2doc/m2doc mailProcessRequest=3D=true( ... )/processRequest/soapenv:Body/soapenv:EnvelopeSuch a request cause Axis Exceptions such this one ( release 0.95 ) :It seems the AXIS Api tries to parse XML prior to apply quoted-printable decoding. Is it a good interpretation ??xml version='1.0' encoding='UTF-8'?soapenv:Envelopexmlns:soapenv=http://www.w3.org/2003/05/soap-envelope soapenv:Header/soapenv:Bodysoapenv:Faultsoapenv:Codesoapenv:Valuesoapenv:Sender/soapenv:Value/soapenv:Codesoapenv:Reasonsoapenv:Text xml:lang=en-USUnexpected character '3' (code 51); expected a quotecharacter enclosing value for 'version'at [row,col {unknown-source}]: [1,15]; nested exception is:com.ctc.wstx.exc.WstxUnexpectedCharException : Unexpectedcharacter '3' (code 51); expected a quote character enclosing value for'version'at [row,col {unknown-source}]:[1,15]/soapenv:Text/soapenv:Reasonsoapenv:DetailException xmlns=org.apache.axis2.AxisFault: Unexpected character '3' (code 51);expected a quote character enclosing value for 'version'at [row,col {unknown-source}]: [1,15]; nested exception is: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpectedcharacter '3' (code 51); expected a quote character enclosing value for'version'at [row,col {unknown-source}]: [1,15]atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest (HTTPTransportUtils.java:297)atorg.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160)at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)atorg.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)atorg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664)atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java :80)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595)Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '3' (code 51); expected a quote character enclosing value for'version'at [row,col {unknown-source}]:
Re: MTOM Problem With generated code
Hi Jim; Can you please create JIRA. Jim Collins wrote: Hi, I used WSDL2Java to generate server and client code and deployed the server. I have sent an attachment to the server using the AXIS2 APIs but when I try and send one using the generated Stub I get a Data Binding error. I looked at what was being sent using TCP monitior and with the AXIS2 APIs everything is as expectted but when using the Stub the attachment data is sent in the SOAP Body and not outside of this as it should be. Does anyone have any sample code they could send using MTOM but using generated code and not the AXIS2 APIs? Below is the WSDL I used in case this helps. Regards Jim ?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://tempuri.org/; 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://tempuri.org/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; wsdl:types s:schema elementFormDefault=qualified targetNamespace=http://tempuri.org/; s:element name=GetLumpOfBinary s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=fileName type=s:string / /s:sequence /s:complexType /s:element s:element name=GetLumpOfBinaryResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=GetLumpOfBinaryResult type=s:base64Binary / /s:sequence /s:complexType /s:element s:element name=SetLumpOfBinary s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=data type=s:base64Binary / s:element minOccurs=0 maxOccurs=1 name=fileName type=s:string / /s:sequence /s:complexType /s:element s:element name=SetLumpOfBinaryResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=SetLumpOfBinaryResult type=s:int / /s:sequence /s:complexType /s:element /s:schema /wsdl:types wsdl:message name=GetLumpOfBinarySoapIn wsdl:part name=parameters element=tns:GetLumpOfBinary / /wsdl:message wsdl:message name=GetLumpOfBinarySoapOut wsdl:part name=parameters element=tns:GetLumpOfBinaryResponse / /wsdl:message wsdl:message name=SetLumpOfBinarySoapIn wsdl:part name=parameters element=tns:SetLumpOfBinary / /wsdl:message wsdl:message name=SetLumpOfBinarySoapOut wsdl:part name=parameters element=tns:SetLumpOfBinaryResponse / /wsdl:message wsdl:portType name=BinarySoap wsdl:operation name=GetLumpOfBinary wsdl:input message=tns:GetLumpOfBinarySoapIn / wsdl:output message=tns:GetLumpOfBinarySoapOut / /wsdl:operation wsdl:operation name=SetLumpOfBinary wsdl:input message=tns:SetLumpOfBinarySoapIn / wsdl:output message=tns:SetLumpOfBinarySoapOut / /wsdl:operation /wsdl:portType wsdl:binding name=BinarySoap type=tns:BinarySoap soap:binding transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=GetLumpOfBinary soap:operation soapAction=http://tempuri.org/GetLumpOfBinary; style=document / wsdl:input soap:body use=literal / /wsdl:input wsdl:output soap:body use=literal / /wsdl:output /wsdl:operation wsdl:operation name=SetLumpOfBinary soap:operation soapAction=http://tempuri.org/SetLumpOfBinary; 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=BinarySoap12 type=tns:BinarySoap soap12:binding transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=GetLumpOfBinary soap12:operation soapAction=http://tempuri.org/GetLumpOfBinary; style=document / wsdl:input soap12:body use=literal / /wsdl:input wsdl:output soap12:body use=literal / /wsdl:output /wsdl:operation wsdl:operation name=SetLumpOfBinary soap12:operation soapAction=http://tempuri.org/SetLumpOfBinary; 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=DocumentumService wsdl:port name=BinarySoap binding=tns:BinarySoap soap:address location=http://localhost:3718/BinaryService/Binary.asmx; / /wsdl:port wsdl:port name=BinarySoap12 binding=tns:BinarySoap12 soap12:address location=http://localhost:3718/BinaryService/Binary.asmx; / /wsdl:port /wsdl:service /wsdl:definitions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For
RE: Problem with 'httpChunkStream = true' through VPN
Thank you for the quick reply. However, I don't have the setscopedproperty method. In which version of Axis is this available. I'm running 1.2.1. How can I do this in 1.2.1? -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: 29 May 2006 17:21 To: axis-user@ws.apache.org Subject: Re: Problem with 'httpChunkStream = true' through VPN Good Morning Ken- good news you have been able to determine the workaround.. for configuring the chunking capability you will need to set the HTTP transport version back to 1.0 Service service = new Service(); //A new axis Service. Call call = (Call) service.createCall(); //Create a call to the service. /*Un comment the below statement to do HTTP/1.1 protocol (to enable chunking..)*/ //call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION ,HTTPConstants.HEADER_PROTOCOL_V11); //Hashtable myhttp = new Hashtable(); //myhttp.put(, yyy); //Send extra soap headers //myhttp.put(SOAPAction, dyyy); //myhttp.put(SOAPActions, prova); /*Un comment the below to do http chunking to avoid the need to calculate content-length. (Needs HTTP/1.1)*/ //myhttp.put(HTTPConstants.HEADER_TRANSFER_ENCODING, HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED); //this option will disable chunking.. call.setScopedProperty(MessageContext.HTTP_TRANSPOR_VERSION,Ht tpConstants.HEADER_PROTOCOL_V10); HTH Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Westelinck, Kenneth [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, May 29, 2006 9:45 AM Subject: Problem with 'httpChunkStream = true' through VPN Hi all, I am using Axis to call webservices storing business objects in Microsoft CRM (works great!!!). I've been developing and calling webservices on a server running local on top of vmware. Now I am trying to call my colleagues development server which I can access through a VPN tunnel ... But it fails. I get the following exception: java.net.SocketException: Connection reset Cool, so I started digging and found that I don't get this exception when setting 'httpChunkStream = false'. This is the testcode: HttpClient httpClient = new HttpClient(); Credentials credentials = new NTCredentials(user, pwd, localhost, domain); httpClient.getState().setCredentials(AuthScope.ANY, credentials); HttpMethodBase method = new PostMethod(http://localhost/mscrmservices/2006/crmservice.asmx;); Message reqMessage = new Message(test); ((PostMethod)method).setRequestEntity(new MessageRequestEntity(method, reqMessage, false)); try { int returnCode = httpClient.executeMethod(method); String response = method.getResponseBodyAsString(); System.out.println(Response: + response); } catch (HttpException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } How to propagate this property to Axis (I'm using the stub generated by wsdl2java). Thanks. Regards, Kenneth - 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]