You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sundar <s....@ntta.com> on 2010/07/29 17:08:26 UTC

consuming a remote webservice

 I am trying to consume a remote webservice (saleforce.com related 
wsdl). The steps I took are
1) Use ant task for "wsdlTojava" and was able to create a client for 
 the wsdl (I imported my wsdl to my web-inf/wsdl folder). I use 
 xmlbeans as the databinding.
 2) Customize the generated "client stub" for the input parameters in 
 my java class.

 Is there anything additional that i need to do, before I 
 started testing this as a standalone program ?.

 I am getting this error, when I run the client stub (as a java
 application): 
 Exception in thread "main" javax.xml.ws.WebServiceException: Port 
 {urn:enterprise.soap.sforce.com}Soap not found.
 	at
 org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
 	at
 org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:303)
 	at javax.xml.ws.Service.getPort(Service.java:92)
 	at
 com.sforce.soap.enterprise.SforceService.getSoap(SforceService.java:62)
 	at
 com.sforce.soap.enterprise.Soap_Soap_Client.main(Soap_Soap_Client.java
 :5
 0)


Thanks
Sundar
-- 
View this message in context: http://cxf.547215.n5.nabble.com/consuming-a-remote-webservice-tp2256732p2256732.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: consuming a remote webservice

Posted by Daniel Kulp <dk...@apache.org>.
Is the wsdl available anywhere?   

Not really sure what would cause that providing the WSDL was able to be loaded 
by the  SforceService object when it was created and the WSDL has a 
service/port of the proper name.

Dan


On Thursday 29 July 2010 11:08:26 am Sundar wrote:
>  I am trying to consume a remote webservice (saleforce.com related
> wsdl). The steps I took are
> 1) Use ant task for "wsdlTojava" and was able to create a client for
>  the wsdl (I imported my wsdl to my web-inf/wsdl folder). I use
>  xmlbeans as the databinding.
>  2) Customize the generated "client stub" for the input parameters in
>  my java class.
> 
>  Is there anything additional that i need to do, before I
>  started testing this as a standalone program ?.
> 
>  I am getting this error, when I run the client stub (as a java
>  application):
>  Exception in thread "main" javax.xml.ws.WebServiceException: Port
>  {urn:enterprise.soap.sforce.com}Soap not found.
>  	at
>  org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
>  	at
>  org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:303)
>  	at javax.xml.ws.Service.getPort(Service.java:92)
>  	at
>  com.sforce.soap.enterprise.SforceService.getSoap(SforceService.java:62)
>  	at
>  com.sforce.soap.enterprise.Soap_Soap_Client.main(Soap_Soap_Client.java
> 
>  :5
> 
>  0)
> 
> 
> Thanks
> Sundar

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