You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Lin Sun (JIRA)" <ji...@apache.org> on 2007/04/03 20:50:32 UTC

[jira] Updated: (AXIS2-2353) Selecting a port name / wsdl provided scenario

     [ https://issues.apache.org/jira/browse/AXIS2-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lin Sun updated AXIS2-2353:
---------------------------

    Attachment: Calculator.java

Updated the SEI per Jeff's comment.  

However, I still got similar exception on the client side - 

Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'o' (code 111) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:172)
	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:67)
	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:125)
	at org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute(AxisInvocationController.java:572)
	at org.apache.axis2.jaxws.core.controller.AxisInvocationController.doInvoke(AxisInvocationController.java:109)
	at org.apache.axis2.jaxws.core.controller.InvocationController.invoke(InvocationController.java:96)
	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:264)
	at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:136)
	at $Proxy9.add(Unknown Source)
	at org.apache.geronimo.samples.jws.client.CalculatorClient.add(CalculatorClient.java:45)
	at org.apache.geronimo.samples.jws.client.CalculatorClient.main(CalculatorClient.java:33)
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'o' (code 111) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:211)
	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:163)
	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:111)
	at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:474)
	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:130)
	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:77)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:356)
	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
	at org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute(AxisInvocationController.java:567)
	... 7 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'o' (code 111) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623)
	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:125)
	... 15 more


On my server side, I got -

14:45:57,515 ERROR [Axis2WebServiceContainer] Exception occurred while trying to
 invoke service method doService()
org.apache.axis2.AxisFault: A Java method was not found for the operation. If th
e WSDL operation name is different from the Java method name, make sure that the
 @WebMethod annotation name is present.
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:381)
        at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessa
geReceiver.java:149)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:279)
        at org.apache.geronimo.axis2.pojo.POJOWebServiceContainer.processPostReq
uest(POJOWebServiceContainer.java:78)
        at org.apache.geronimo.axis2.Axis2WebServiceContainer.doService2(Axis2We
bServiceContainer.java:269)
        at org.apache.geronimo.axis2.Axis2WebServiceContainer.doService(Axis2Web
ServiceContainer.java:192)
        at org.apache.geronimo.axis2.Axis2WebServiceContainer.invoke(Axis2WebSer
viceContainer.java:141)
        at org.apache.geronimo.webservices.WebServiceContainerInvoker.service(We
bServiceContainerInvoker.java:84)
        at org.apache.geronimo.webservices.POJOWebServiceServlet.service(POJOWeb
ServiceServlet.java:79)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:228)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
        at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
bjectValve.java:56)
        at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.
invoke(GeronimoStandardContext.java:324)
        at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Gero
nimoBeforeAfterValve.java:47)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
543)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:216)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:634)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
5)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.ws.WebServiceException: A Java method was not found for the
 operation. If the WSDL operation name is different from the Java method name, m
ake sure that the @WebMethod annotation name is present.
        at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(Exc
eptionFactory.java:170)
        at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Excep
tionFactory.java:67)
        at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Excep
tionFactory.java:115)
        at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.getJavaMe
thod(JavaBeanDispatcher.java:226)
        at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(Ja
vaBeanDispatcher.java:73)
        at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointContr
oller.java:151)
        at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessa
geReceiver.java:103)
        ... 24 more

Am I missing something else in the sample?   Thx, Lin




> Selecting a port name / wsdl provided scenario
> ----------------------------------------------
>
>                 Key: AXIS2-2353
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2353
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Davanum Srinivas
>         Assigned To: Jeff Barrett
>         Attachments: Calculator.java, Calculator.java, CalculatorClient.java, CalculatorService.java, CalculatorService.wsdl
>
>
> Port Name confusion.
> EndpointDesciptionImpl#selectWSDLPortToUse (Line 1396) says:
>         // Per JSR-181, 
>         // - The portType name corresponds to the WebService.name annotation value, which is
>         //   returned by getName()
>         // - The portType namespace corresponds to the WebService.targetNamespace annotation, which
>         //   is returned by getTargetNamespace()
>         String portTypeLP = getName();
> BUT, EndpointDesciptionImpl#getAnnoWebServicePortName does this:
>                     // This is the @WebService annotation path
>                     // Default value is the @WebService.name of the class or interface + "Port"
>                     // Per JSR-181 MR Sec 4.1, pg 15
>                     annotation_PortName = getAnnoWebServiceName() + "Port";
> So which is correct?
> Here's the scenario we are trying:
> http://cwiki.apache.org/GMOxDOC20/simple-web-service-with-jax-ws.html
> We will upload the latest versions of wsdl/service/client as well.
> -- dims

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org