wood burning stoves 2.0*
The moose likes Web Services and the fly likes calling a .net web service from  server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "calling a .net web service from  server" Watch "calling a .net web service from  server" New topic
Author

calling a .net web service from server

niras iva
Greenhorn

Joined: May 10, 2011
Posts: 18
Sir

Actually My proxy classes are generated without error but i got warning message.My web service also generated without error,i copied that generated classes to my server and calling that web service .while coping that proxy classes i got a error like this.

The method getPort(QName, Class<T>) in the type Service is not applicable for the arguments (QName,
Class<ServiceSoap>, WebServiceFeature[])

MyJdk version:1.6.0_17
jaxws version :2.1

To generate the proxy classes i used this command:
C:\Program Files\jav\jdk1.6.0_17\bin>wsimport -s code -p helloclient -extension
http://10.0.3.24/Test/Service.asmx?wsdl
parsing WSDL...


[WARNING] SOAP port "ServiceSoap12": uses a non-standard SOAP 1.2 binding.
line 138 of http://10.0.3.24/Test/Service.asmx?wsdl

generating code...


compiling code...


C:\Program Files\jav\jdk1.6.0_17\bin>



My webservice code:
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="HelloWorld">
<s:complexType />
</s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:base64Binary" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="Show">
<s:complexType />
</s:element>
- <s:element name="ShowResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ShowResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="Insert">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="CSBytes" type="s:long" />
<s:element minOccurs="1" maxOccurs="1" name="SCBytes" type="s:long" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="InsertResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="InsertResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>
- <wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
- <wsdl:message name="ShowSoapIn">
<wsdl:part name="parameters" element="tns:Show" />
</wsdl:message>
- <wsdl:message name="ShowSoapOut">
<wsdl:part name="parameters" element="tns:ShowResponse" />
</wsdl:message>
- <wsdl:message name="InsertSoapIn">
<wsdl:part name="parameters" element="tns:Insert" />
</wsdl:message>
- <wsdl:message name="InsertSoapOut">
<wsdl:part name="parameters" element="tns:InsertResponse" />
</wsdl:message>
- <wsdl:portType name="ServiceSoap">
- <wsdlperation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdlutput message="tns:HelloWorldSoapOut" />
</wsdlperation>
- <wsdlperation name="Show">
<wsdl:input message="tns:ShowSoapIn" />
<wsdlutput message="tns:ShowSoapOut" />
</wsdlperation>
- <wsdlperation name="Insert">
<wsdl:input message="tns:InsertSoapIn" />
<wsdlutput message="tns:InsertSoapOut" />
</wsdlperation>
</wsdl:portType>
- <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdlperation name="HelloWorld">
<soapperation soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdlutput>
<soap:body use="literal" />
</wsdlutput>
</wsdlperation>
- <wsdlperation name="Show">
<soapperation soapAction="http://tempuri.org/Show" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdlutput>
<soap:body use="literal" />
</wsdlutput>
</wsdlperation>
- <wsdlperation name="Insert">
<soapperation soapAction="http://tempuri.org/Insert" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdlutput>
<soap:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
- <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdlperation name="HelloWorld">
<soap12peration soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdlutput>
<soap12:body use="literal" />
</wsdlutput>
</wsdlperation>
- <wsdlperation name="Show">
<soap12peration soapAction="http://tempuri.org/Show" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdlutput>
<soap12:body use="literal" />
</wsdlutput>
</wsdlperation>
- <wsdlperation name="Insert">
<soap12peration soapAction="http://tempuri.org/Insert" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdlutput>
<soap12:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
- <wsdl:service name="Service">
- <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
<soap:address location="http://10.0.3.24/Test/Service.asmx" />
</wsdl:port>
- <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
<soap12:address location="http://10.0.3.24/Test/Service.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>



 
Don't get me started about those stupid light bulbs.
 
subject: calling a .net web service from server
 
Similar Threads
problem calling a remote webservice [ Algo Error]
Consuming a .NET Typed DataSet from Java
got error when call to >net webservice from java client
access to .net web service
JAXB bindings