Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.1.1, 2.0.7
-
None
-
Moderate
Description
Here is the WSDL that CXF cannot handle.
http://demo.aws.air-worldwide.com/aws/passporttogo.asmx?wsdl
If you generate a client with wsdl2java in both latest releases of CXF you will see that it fails at runtime.
I tested the code against JAXWS-RI client and it works fine.
This is the usecase to test;
public void runThis(){
try {
com.air_worldwide.webservices.PassportToGo service = new com.air_worldwide.webservices.PassportToGo();
com.air_worldwide.webservices.PassportToGoSoap port = service.getPassportToGoSoap();
java.lang.String xmlReqStg = str;
java.lang.String result = port.getISOData(xmlReqStg);
System.out.println("Result = "+result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}
please use this following string for the parameter of the porg.getISOData( ) method
"<ISORequests><RequestHeader><AIR><LicenseKey>QLAFKIUDJ%7DLWEHAVLFEJN%60%7DWQKJ%60</LicenseKey><LoginID>amkeystone_ws</LoginID><Password>amke9919</Password></AIR><Passport><LoginID>AARPASA#</LoginID> <Password>ARPASA#</Password> <ResellerID>33755</ResellerID><OrderAccountNumber>41619</OrderAccountNumber> <ShipToAccountNumber>41619</ShipToAccountNumber><WebServiceUserID>PIDAIRPASSA</WebServiceUserID> <WebServicePassword>k!9s!j45</WebServicePassword><UserID>0</UserID></Passport></RequestHeader><ISORequest><Products>DetailPPC</Products><Addresses><Options parse=\"yes\" validateCSZ=\"no\" validateAddress=\"yes\" geocode=\"yes\" returnHighestScore=\"yes\" /><Address><Type>UnparsedRiskAddress</Type><Addr1>Address 1</Addr1><City>City</City><StateProv>State</StateProv><PostalCode>Zip</PostalCode><ZIP4/><ZIPCarrierRoute/></Address></Addresses></ISORequest></ISORequests> "
Using the build.xml script i get the following error
C:\CXF\genClients>ant PassportToGoSoapClient1
Buildfile: build.xml
compile:
PassportToGoSoapClient1:
[java] Invoking getISOData...
[java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Cou
ld not send Message.
[java] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy
.java:199)
[java] at $Proxy39.getISOData(Unknown Source)
[java] at com.air_worldwide.webservices.PassportToGoSoap_PassportToGoSo
ap_Client.main(PassportToGoSoap_PassportToGoSoap_Client.java:57)
[java] Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
[java] at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSe
nderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
[java] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseI
nterceptorChain.java:221)
[java] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296
)
[java] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242
)
[java] at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.ja
va:73)
[java] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy
.java:178)
[java] ... 2 more
[java] Caused by: java.io.IOException: Not Found
[java] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream
.handleResponse(HTTPConduit.java:1929)
[java] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream
.close(HTTPConduit.java:1832)
[java] at org.apache.cxf.transport.AbstractConduit.close(AbstractCondui
t.java:66)
[java] at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.j
ava:591)
[java] at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSe
nderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
[java] ... 7 more
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 3 seconds
Also in this error when running as a JUNIT test
java.lang.IncompatibleClassChangeError
at org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(WSDLServiceBuilder.java:120)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:243)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:160)
at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:141)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:132)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:65)
at javax.xml.ws.Service.<init>(Service.java:36)
at com.air_worldwide.webservices.PassportToGo.<init>(PassportToGo.java:46)
at com.bipt.tiva.uw.jaxws.client.air_worldwide.AirWSClient.getISODataDetailPPC(AirWSClient.java:323)
at com.bipt.tiva.test.jaxws.client.AirClientTest.testAirClientMenthod(AirClientTest.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196