You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by conorb <co...@hp.com> on 2009/07/13 23:27:38 UTC

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.


Re: wsdl2java runtime exception

Posted by conorb <co...@hp.com>.
Thanks for the suggestions, I'll give that a try.  I agree that isn't
something that one should normally do but it may help move progress in the
forward direction.

I have been able to construct my own SOAP xml message that I'm going to post
to the test server and see how that works.  As soon as the test server is
back up. :)

conorb



You can TRY configuring the HTTPs conduits to disable the CN check.  That
may 
allow it to work, but is definitely not something you normally want to do. 

You would need to create a cxf.xml file on the classpath that would have a 
http:conduit defined.   Something like:
<http:conduit name="https://g4w0209.americas.hpqcorp.net/.*">
        <http:tlsClientParameters disableCNCheck="true"/>
 </http:conduit>

That SHOULD just disable the CN checks for that host only.   

Dan


-- 
View this message in context: http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24504894.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: wsdl2java runtime exception

Posted by Daniel Kulp <dk...@apache.org>.
You can TRY configuring the HTTPs conduits to disable the CN check.  That may 
allow it to work, but is definitely not something you normally want to do. 

You would need to create a cxf.xml file on the classpath that would have a 
http:conduit defined.   Something like:
<http:conduit name="https://g4w0209.americas.hpqcorp.net/.*">
        <http:tlsClientParameters disableCNCheck="true"/>
 </http:conduit>

That SHOULD just disable the CN checks for that host only.   

Dan



On Mon July 13 2009 8:01:31 pm conorb wrote:
> I'm using the 2.2.2 version of CXF and the url for the service is:
> http://h50203.www5.hp.com/hpisweb/ISASCustomerWebService/CustomerService.sv
>c - which is our main customer support site.
>
> The wsdl url is available externally here:
> https://ispe4p.houston.hp.com/HPISWeb/ISASCustomerWebService/CustomerServic
>e.svc?wsdl - at least that's what I was told.  I'm not the most savvy
> networking guy.
>
> I'm beginning to wonder if I'm having DNS naming issues.  It seems that
> there are several severs that are hooked up a central load balancer and
> that could be mucking things up a bit.  Is there a way to set alternative
> DNS names for a single cert in one's keystore?
>
> Thanks,
>
> conorb
>
> bimargulies wrote:
> > What version of CXF? Is the wsdl available to the rest of us?
> >
> > On Mon, Jul 13, 2009 at 7:18 PM, conorb<co...@hp.com> 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_BasicHttpBindingI
> >>CustomerService_Client.main(ICustomerService_BasicHttpBindingICustomerSer
> >>vice_Client.java:67) [java] Caused by: java.lang.NullPointerException
> >>     [java]     at
> >> org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptor.handleMessage(MTOMPo
> >>licyInterceptor.java:45) [java]     at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >>hain.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: bjennings@alifemedical.com
> >>> 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:conor.buescher@hp.com]
> >>> Sent: Monday, July 13, 2009 2:28 PM
> >>> To: users@cxf.apache.org
> >>> 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.h
> >>>tml Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24471144.ht
> >>ml Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: wsdl2java runtime exception

Posted by Benson Margulies <bi...@gmail.com>.
Here's what I see with trunk:


WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to
create wsdl definition from :
https://ispe4p.houston.hp.com/HPISWeb/ISASCustomerWebService/CustomerService.svc?wsdl
Caused by : WSDLException (at /wsdl:definitions/wsdl:import):
faultCode=PARSER_ERROR: Problem parsing
'https://g4w0209.americas.hpqcorp.net/HPISWeb/ISASCustomerWebService/CustomerService.svc?wsdl=wsdl0'.:
java.io.IOException: HTTPS hostname wrong:  should be
<g4w0209.americas.hpqcorp.net>

Note that the error contains the right URL instead of the wrong one, as it were.

On Mon, Jul 13, 2009 at 8:01 PM, conorb<co...@hp.com> wrote:
>
> I'm using the 2.2.2 version of CXF and the url for the service is:
> http://h50203.www5.hp.com/hpisweb/ISASCustomerWebService/CustomerService.svc
> - which is our main customer support site.
>
> The wsdl url is available externally here:
> https://ispe4p.houston.hp.com/HPISWeb/ISASCustomerWebService/CustomerService.svc?wsdl
> - at least that's what I was told.  I'm not the most savvy networking guy.
>
> I'm beginning to wonder if I'm having DNS naming issues.  It seems that
> there are several severs that are hooked up a central load balancer and that
> could be mucking things up a bit.  Is there a way to set alternative DNS
> names for a single cert in one's keystore?
>
> Thanks,
>
> conorb
>
>
>
> bimargulies wrote:
>>
>> What version of CXF? Is the wsdl available to the rest of us?
>>
>> On Mon, Jul 13, 2009 at 7:18 PM, conorb<co...@hp.com> 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: bjennings@alifemedical.com
>>>> 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:conor.buescher@hp.com]
>>>> Sent: Monday, July 13, 2009 2:28 PM
>>>> To: users@cxf.apache.org
>>>> 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.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24471564.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: wsdl2java runtime exception

Posted by Benson Margulies <bi...@gmail.com>.
I'm a little uncertain about our status with wsdl-fetching over https.

On Mon, Jul 13, 2009 at 8:01 PM, conorb<co...@hp.com> wrote:
>
> I'm using the 2.2.2 version of CXF and the url for the service is:
> http://h50203.www5.hp.com/hpisweb/ISASCustomerWebService/CustomerService.svc
> - which is our main customer support site.
>
> The wsdl url is available externally here:
> https://ispe4p.houston.hp.com/HPISWeb/ISASCustomerWebService/CustomerService.svc?wsdl
> - at least that's what I was told.  I'm not the most savvy networking guy.
>
> I'm beginning to wonder if I'm having DNS naming issues.  It seems that
> there are several severs that are hooked up a central load balancer and that
> could be mucking things up a bit.  Is there a way to set alternative DNS
> names for a single cert in one's keystore?
>
> Thanks,
>
> conorb
>
>
>
> bimargulies wrote:
>>
>> What version of CXF? Is the wsdl available to the rest of us?
>>
>> On Mon, Jul 13, 2009 at 7:18 PM, conorb<co...@hp.com> 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: bjennings@alifemedical.com
>>>> 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:conor.buescher@hp.com]
>>>> Sent: Monday, July 13, 2009 2:28 PM
>>>> To: users@cxf.apache.org
>>>> 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.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24471564.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: wsdl2java runtime exception

Posted by conorb <co...@hp.com>.
I'm using the 2.2.2 version of CXF and the url for the service is:
http://h50203.www5.hp.com/hpisweb/ISASCustomerWebService/CustomerService.svc
- which is our main customer support site.

The wsdl url is available externally here:
https://ispe4p.houston.hp.com/HPISWeb/ISASCustomerWebService/CustomerService.svc?wsdl
- at least that's what I was told.  I'm not the most savvy networking guy.

I'm beginning to wonder if I'm having DNS naming issues.  It seems that
there are several severs that are hooked up a central load balancer and that
could be mucking things up a bit.  Is there a way to set alternative DNS
names for a single cert in one's keystore?

Thanks,

conorb



bimargulies wrote:
> 
> What version of CXF? Is the wsdl available to the rest of us?
> 
> On Mon, Jul 13, 2009 at 7:18 PM, conorb<co...@hp.com> 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: bjennings@alifemedical.com
>>> 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:conor.buescher@hp.com]
>>> Sent: Monday, July 13, 2009 2:28 PM
>>> To: users@cxf.apache.org
>>> 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.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/wsdl2java-runtime-exception-tp24469693p24471564.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: wsdl2java runtime exception

Posted by Benson Margulies <bi...@gmail.com>.
What version of CXF? Is the wsdl available to the rest of us?

On Mon, Jul 13, 2009 at 7:18 PM, conorb<co...@hp.com> 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: bjennings@alifemedical.com
>> 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:conor.buescher@hp.com]
>> Sent: Monday, July 13, 2009 2:28 PM
>> To: users@cxf.apache.org
>> 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.
>
>

RE: wsdl2java runtime exception

Posted by conorb <co...@hp.com>.
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: bjennings@alifemedical.com
> 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:conor.buescher@hp.com] 
> Sent: Monday, July 13, 2009 2:28 PM
> To: users@cxf.apache.org
> 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.


RE: wsdl2java runtime exception

Posted by Blair Jennings <bj...@alifemedical.com>.
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: bjennings@alifemedical.com
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:conor.buescher@hp.com] 
Sent: Monday, July 13, 2009 2:28 PM
To: users@cxf.apache.org
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.