[ http://issues.apache.org/jira/browse/AXIS2-1339?page=comments#action_12443560 ] yogen commented on AXIS2-1339: ------------------------------
After engaging the addressing module, I am getting this error: "Message: only whitespace content allowed before start tag and not -" ############################################################################## Oct 19, 2006 11:55:29 AM org.apache.axis2.deployment.DeploymentEngine doDeploy INFO: Deploying module : addressing-1.09 org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: only whitespace content allowed before start tag and not -; nested exception is: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: only whitespace content allowed before start tag and not - at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:126) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:367) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:281) at com.sample.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:505) at TCP1Client.echoString(TCP1Client.java:28) at TCP1Client.main(TCP1Client.java:17) Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: only whitespace content allowed before start tag and not - at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:199) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:155) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion(StAXSOAPModelBuilder.java:131) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:106) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:120) ... 6 more Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: only whitespace content allowed before start tag and not - at com.bea.xml.stream.MXParser.parseProlog(MXParser.java:2044) at com.bea.xml.stream.MXParser.nextImpl(MXParser.java:1947) at com.bea.xml.stream.MXParser.next(MXParser.java:1333) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:116)null ... 10 more ############################################################################## Viewing the message in TCPMon the message looks like this: ############################################################################## --MIMEBoundaryurn_uuid_5E3F43F482C80E679911612724538971 content-type: application/xop+xml; charset=utf-8; type="text/xml"; content-transfer-encoding: binary content-id: <0.urn:uuid:[EMAIL PROTECTED]> <?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsa:To>tcp://localhost:7070/axis2/services/Axis2SampleDocLitService</wsa:To> <wsa:ReplyTo> <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address> </wsa:ReplyTo> <wsa:MessageID>urn:uuid:4284CC3353C978EC2911612724537881</wsa:MessageID> <wsa:Action>echoString</wsa:Action> </soapenv:Header> <soapenv:Body> <echoStringParam xmlns="http://userguide.axis2.apache.org/xsd">echo</echoStringParam> </soapenv:Body> </soapenv:Envelope> --MIMEBoundaryurn_uuid_5E3F43F482C80E679911612724538971-- ############################################################################## This is the client code: ############################################################################## public class TCP1Client{ public static void main(java.lang.String args[]){ Axis2SampleDocLitServiceStub stub = null; try{ stub = new Axis2SampleDocLitServiceStub(null, "tcp://localhost:7070/axis2/services/Axis2SampleDocLitService"); stub._getServiceClient().getOptions().setTo(new EndpointReference("tcp://localhost:7070/axis2/services/Axis2SampleDocLitService")); stub._getServiceClient().getOptions().setTransportInProtocol(Constants.TRANSPORT_TCP); stub._getServiceClient().engageModule(new QName(Constants.MODULE_ADDRESSING)); System.out.println(echoString(stub)); } catch(Exception e){ e.printStackTrace(); } } public static String echoString(Axis2SampleDocLitServiceStub stub){ try{ EchoStringParamDocument reqDoc00 = EchoStringParamDocument.Factory.newInstance(); reqDoc00.setEchoStringParam("echo"); EchoStringReturnDocument resDoc00 = stub.echoString(reqDoc00); return resDoc00.getEchoStringReturn(); } catch(Exception e){ e.printStackTrace(); } return null; } } ############################################################################## > WSDL2Java client side stub code does not work with AXIS2 TCP Server > ------------------------------------------------------------------- > > Key: AXIS2-1339 > URL: http://issues.apache.org/jira/browse/AXIS2-1339 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: core > Affects Versions: 1.1 > Environment: Sun JVM 1.5, Axis2 1.1, WinXP > Reporter: yogen > Priority: Critical > > The sample service axis2-rc1\samples\userguide\MyService.aar and client > \axis2-rc1\samples\userguide\src\userguide\clients\TCPClient.java *works* > with AXIS2 TCP Server. > But the code generated using wsdl2java for > \axis2-rc1\samples\wsdl\Axis2SampleDocLit.wsdl and service > Axis2SampleDocLitService.aar *does not work* with AXIS2 TCP Server (works > with HTTP Server). > 1. the code is generated like this: >wsdl2java -d xmlbeans -p com.sample -ss > -sd -g -uri Axis2SampleDocLit.wsdl -pn Axis2SampleDocLitPort > 2. the service runs on port 6060. > 3. Running the client code throws this exception stack trace: > Oct 10, 2006 12:06:02 PM org.apache.axis2.deployment.DeploymentEngine doDeploy > INFO: Deploying module : addressing-1.09 > org.apache.axis2.AxisFault: Service not found operation terminated !! > at > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) > at > com.sample.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:505) > at TCP1Client.echoString(TCP1Client.java:28) > at TCP1Client.main(TCP1Client.java:17) > The client code is attached: > import javax.xml.namespace.QName; > import org.apache.axis2.Constants; > import org.apache.axis2.addressing.EndpointReference; > import org.apache.axis2.userguide.xsd.*; > import com.sample.*; > public class TCP1Client{ > public static void main(java.lang.String args[]){ > Axis2SampleDocLitServiceStub stub = null; > try{ > stub = new Axis2SampleDocLitServiceStub(null, > "tcp://localhost:6060/axis2/services/Axis2SampleDocLitService"); > stub._getServiceClient().getOptions().setTo(new > EndpointReference("tcp://localhost:6060/axis2/services/Axis2SampleDocLitService")); > > stub._getServiceClient().getOptions().setTransportInProtocol(Constants.TRANSPORT_TCP); > stub._getServiceClient().engageModule(new > QName(Constants.MODULE_ADDRESSING)); > System.out.println(echoString(stub)); > } catch(Exception e){ > e.printStackTrace(); > } > } > public static String echoString(Axis2SampleDocLitServiceStub stub){ > try{ > EchoStringParamDocument reqDoc00 = > EchoStringParamDocument.Factory.newInstance(); > reqDoc00.setEchoStringParam("echo"); > EchoStringReturnDocument resDoc00 = stub.echoString(reqDoc00); > return resDoc00.getEchoStringReturn(); > } catch(Exception e){ > e.printStackTrace(); > } > return null; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]