Runtime error in server with wrong interface in serviceinfo
-----------------------------------------------------------

                 Key: CXF-1050
                 URL: https://issues.apache.org/jira/browse/CXF-1050
             Project: CXF
          Issue Type: Bug
          Components: Core
            Reporter: Jeff Zhang
         Attachments: uddiv3.zip

I use CXF to work on UDDI v3 wsdl files. (pls see comment attached file)

Found a bug caused by service model or Jaxws frontend.

reproduce:
wsdl2java -all cxf_server.wsdl

modify UDDIInquiryPortTypeImpl.java (see JIRA 1048)
@javax.jws.WebService(name = "UDDIInquiryPortType", serviceName = "CXFServer",
                      portName = "UDDI_Inquiry_PortType",
                      targetNamespace = "urn:uddi-org:v3_service", 
                      wsdlLocation = "file:etc/cxf_server.wsdl" ,

and ant task in build.xml
    <target name="UDDIInquiryPortType_UDDIInquiryPort_Server" description="Run 
org.apache.cxf.uddi.v3.UDDISubscriptionListenerPortType_UDDISubscriptionListenerPort_Server"
 depends="compile">
        <cxfrun 
classname="org.uddi.api_v3_porttype.UDDIInquiryPortType_UDDIInquiryPort_Server"
                   param1="file:cxf_server.wsdl"/>
    </target>
    <target name="UDDIInquiryPortType_UDDIInquiryPort_Client" description="Run 
org.apache.cxf.uddi.v3.UDDISubscriptionListenerPortType_UDDISubscriptionListenerPort_Client"
 depends="compile">
        <property name="param" value=""/>
        <cxfrun 
classname="org.uddi.api_v3_porttype.UDDIInquiryPortType_UDDIInquiryPort_Client"
                   param1="file:cxf_server.wsdl"
                   param2="${op}"
                   param3="${param}"/>
    </target>


modify UDDIInquiryPortType_UDDIInquiryPort_Client.java (fill in message part)

        System.out.println("Invoking findBusiness...");
        org.uddi.api_v3.FindBusiness _findBusiness_body = new 
org.uddi.api_v3.FindBusiness();
        org.uddi.api_v3.Name name = new org.uddi.api_v3.Name();
        name.setValue("%");
        _findBusiness_body.getName().add(name);
        try {
                        org.uddi.api_v3.BusinessList _findBusiness__return = 
port.findBusiness(_findBusiness_body);
            System.out.println("findBusiness.result=" + _findBusiness__return);
        } catch (DispositionReportFaultMessage e) {
            System.out.println("Expected exception: 
DispositionReportFaultMessage has occurred.");
            System.out.println(e.toString());
        }
comment following part, we only test find_business method.

start server, and client.

A exception throwed from server: 
Caused by: org.apache.cxf.binding.soap.SoapFault: Message part 
{urn:uddi-org:api_v3}find_business was not recognized.
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:69)
        at 
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:36)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at 
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:90)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:181)
        at 
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1959)
        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1806)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:574)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        ... 2 more

I looked into runtime code, the serveceinfo contains wrong interface. 
It should find method in "UDDI_Inquiry_PortType" part, but runtime get 
"UDDI_Security_PortType" info.



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

Reply via email to