Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with webservice dynamic proxyclient

 
Kaleeswaran Karuppusamy
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Karuppusamy
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic