What version of CXF? Is the wsdl available to the rest of us?
On Mon, Jul 13, 2009 at 7:18 PM, conorb<[email protected]> wrote: > > Thanks, > > I've gone through everything and all of the referenced urls are resolvable - > at least using Firefox. I've also double checked to ensure that I have the > proper certs in my keystore - they appear to be there. > > When I save all of the urls as files and then changes the urls within the > files to be the path to the various files and then run wsdl2java it works. > This is a big pain and not really what I was looking for. > > If I replace the file names and paths with the original url for the wsdl and > compile and run the generated code I can connect and create a > javax.xml.ws.Service object but any calls to it return SOAPFaultException > caused by a null pointer. > > Buildfile: build.xml > > compile: > > ICustomerServiceClient: > [java] wsdl url = https://url2wsdl?wsdl > [java] successfully created service port via BasicHttpBinding... > [java] Invoking getOpenSRs... > [java] customerId = 1 > [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: > Fault string, and possibly fault code, not set > [java] at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141) > [java] at $Proxy47.getOpenSRs(Unknown Source) > [java] at > com.hp.hpis.customerservice._2009._02.ICustomerService_BasicHttpBindingICustomerService_Client.main(ICustomerService_BasicHttpBindingICustomerService_Client.java:67) > [java] Caused by: java.lang.NullPointerException > [java] at > org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptor.handleMessage(MTOMPolicyInterceptor.java:45) > [java] at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) > [java] at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471) > [java] at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301) > [java] at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253) > [java] at > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > [java] at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121) > [java] ... 2 more > [java] Java Result: 1 > > BUILD SUCCESSFUL > Total time: 29 seconds > > Is this due to non-resolvable schema definitions or other url related > issues? > > conorb > > > Blair Jennings wrote: >> >> I just did this a couple of weeks ago. You need to make sure that all of >> the referenced schema definitions are resolvable. Otherwise odd errors >> occur. If they are not resolvable you will need to hand edit the >> references so that they are. >> >> Blair Jennings >> Sr. Software Engineer >> A-Life Medical >> 6195 Lusk Blvd., Ste 120, San Diego, CA, 92121 >> >> Office: 888.224.6300 x1716 >> Fax: 858.812.0952 >> Email: [email protected] >> Web: www.alifemedical.com >> >> Streamlining the Code to Collection Process with Computerized Practice >> Management and Medical Coding Products and Services >> >> This message is for the sole use of the intended recipient and may contain >> confidential and privileged information. Any unauthorized review, use, >> disclosure or distribution is prohibited. If you are not the intended >> recipient, please contact the sender and destroy all copies of the >> original message. >> >> >> -----Original Message----- >> From: conorb [mailto:[email protected]] >> Sent: Monday, July 13, 2009 2:28 PM >> To: [email protected] >> Subject: wsdl2java runtime exception >> >> >> Hi, >> >> I'm working on creating a java based client on a web service originally >> created with the .net framework over https. So, yeah, it's been a bit of >> a >> pain. :) >> >> I've been able to export the proper certificates to my keystore using >> keytool and I'm now trying to run wsdl2java on the wsdl url and create the >> java client classes. >> >> I'm getting a WSDLRuntimeExcection: Fail to create wsdl definition from : >> file:/<wsdl, wsdl, wsdl> >> Buildfile: build.xml >> >> cxfWSDL2Java: >> [java] Loading FrontEnd jaxws ... >> [java] Loading DataBinding jaxb ... >> [java] wsdl2java -ant -client -verbose -sn CustomerService -d >> instant-support-client -wsdlList https://urltowsdlservice?wsdl >> [java] wsdl2java - Apache CXF 2.2.2 >> [java] >> [java] >> [java] WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: >> Fail to create wsdl definition from : file:/<?xml version="1.0" >> encoding="utf-8"?><wsdl:definitions name="CustomerService" >> targetNamespace="http://tempuri.org/" xmlns >> [java] Caused by : null >> [java] >> >> It appears that I'm accessing the wsdl correctly but then throwing the >> runtime exception due to a null pointer. >> >> If I download the wsdl file and run it through xmllint I don't get any >> parsing errors. >> >> The interesting thing about the url based wsdl is that it has other >> references embedded in it for schema definitions - like a wsdl pointing to >> a >> wsdl pointing to a wsdl, etc. >> >> Any help would be appreciated. >> >> conorb >> >> >> -- >> View this message in context: >> http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24469693.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> >> >> >> >> > > -- > View this message in context: > http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24471144.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
