my dog learned polymorphism*
The moose likes Web Services and the fly likes problem with webservice dynamic proxyclient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem with webservice dynamic proxyclient" Watch "problem with webservice dynamic proxyclient" New topic
Author

problem with webservice dynamic proxyclient

Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
ServiceFactory serviceFactory = ServiceFactory.newInstance();
String wsdlURLString = "http://localhost:8157/voicesys/TranscriptCollectWSService?WSDL";
URL wsdlURL = new URL(wsdlURLString);
String serviceName = "TranscriptCollectWSService";
String nameSpaceURI = "http://services.server.voicesys.m2.com/";
String portName = "TranscriptCollectWSPort";
Service service = serviceFactory.createService(wsdlURL, new QName(
nameSpaceURI, serviceName));
create the service proxy
com.m2.voicesys.server.services.TranscriptCollect serviceProxy = (com.m2.voicesys.server.services.TranscriptCollect) service .getPort(new QName(nameSpaceURI, portName),
com.m2.voicesys.server.services.TranscriptCollect.class);
System.out.println(serviceProxy.authenticate("", "", ""));


when i execute this code i getting this error
Exception in thread "main" port: {http://services.server.voicesys.m2.com/}TranscriptCollectWSPort does not contain operation: getTranscriptFileList

i am using netbean and glassfish server



Judge a man by his questions rather than his answers --Voltaire
SCJP 1.5 97%
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
It looks like the <portType> element in your WSDL corresponding to the {http://services.server.voicesys.m2.com/}TranscriptCollectWSPort does not contain any operation with the name "getTranscriptFileList".
Best wishes!
Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
<definitions targetNamespace="http://services.server.voicesys.m2.com/" name="TranscriptCollectWSService">
<types>

<xsd:schema>
<xsd:import namespace="http://services.server.voicesys.m2.com/" schemaLocation="http://localhost:8157/voicesys/TranscriptCollectWSService?xsd=1"/>
</xsd:schema>
</types>

<message name="authenticate">
<part name="parameters" element="tns:authenticate"/>
</message>

<message name="authenticateResponse">
<part name="parameters" element="tns:authenticateResponse"/>
</message>

<message name="getTranscriptFileList">
<part name="parameters" element="tns:getTranscriptFileList"/>
</message>

<message name="getTranscriptFileListResponse">
<part name="parameters" element="tns:getTranscriptFileListResponse"/>
</message>

<message name="updateTransCollectSentStatus">
<part name="parameters" element="tns:updateTransCollectSentStatus"/>
</message>

<message name="updateTransCollectSentStatusResponse">
<part name="parameters" element="tns:updateTransCollectSentStatusResponse"/>
</message>

<portType name="TranscriptCollectWS">

<operation name="authenticate">
<input message="tns:authenticate"/>
<output message="tns:authenticateResponse"/>
</operation>

<operation name="getTranscriptFileList">
<input message="tns:getTranscriptFileList"/>
<output message="tns:getTranscriptFileListResponse"/>
</operation>

<operation name="updateTransCollectSentStatus">
<input message="tns:updateTransCollectSentStatus"/>
<output message="tns:updateTransCollectSentStatusResponse"/>
</operation>
</portType>

<binding name="TranscriptCollectWSPortBinding" type="tns:TranscriptCollectWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

<operation name="authenticate">
<soapperation soapAction=""/>

<input>
<soap:body use="literal"/>
</input>

<output>
<soap:body use="literal"/>
</output>
</operation>

<operation name="getTranscriptFileList">
<soapperation soapAction=""/>

<input>
<soap:body use="literal"/>
</input>

<output>
<soap:body use="literal"/>
</output>
</operation>

<operation name="updateTransCollectSentStatus">
<soapperation soapAction=""/>

<input>
<soap:body use="literal"/>
</input>

<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>

<service name="TranscriptCollectWSService">

<port name="TranscriptCollectWSPort" binding="tns:TranscriptCollectWSPortBinding">
<soap:address location="http://localhost:8157/voicesys/TranscriptCollectWSService"/>
</port>
</service>
</definitions>


this is my wsdl
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi again!
I notice that you are using the ServiceFactory class to create a Service instance. Are you aware that this class is part of JAX-RPC and not part of JAX-WS?
I do not know if this is the cause of your problems, just wanted to make sure that you know what you are doing, since you said you are developing with GlassFish.
Apart from the above, the WSDL indeed looks correct.
Best wishes!
 
 
subject: problem with webservice dynamic proxyclient