如下代码:
private static final QName SERVICE_NAME = new QName("http://mypack.com/",
"HelloWord");
private static final QName PORT_NAME = new QName("http://mypack.com/",
"HelloWordPort");红色部分这个名字哪里来的????我请求的wsdl <?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions name="HelloWord" targetNamespace="http://mypack.com/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://mypack.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://mypack.com/" xmlns:tns="http://mypack.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="sayHi" type="tns:sayHi" />
- <xsd:complexType name="sayHi">
- <xsd:sequence>
<xsd:element minOccurs="0" name="name" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="sayHiResponse" type="tns:sayHiResponse" />
- <xsd:complexType name="sayHiResponse">
- <xsd:sequence>
<xsd:element minOccurs="0" name="return" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="sayHi">
<wsdl:part element="tns:sayHi" name="parameters" />
</wsdl:message>
- <wsdl:message name="sayHiResponse">
<wsdl:part element="tns:sayHiResponse" name="parameters" />
</wsdl:message>
- <wsdl:portType name="HelloWord">
- <wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHi" name="sayHi" />
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="HelloWordSoapBinding" type="tns:HelloWord">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document" />
- <wsdl:input name="sayHi">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="sayHiResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="HelloWord">
- <wsdl:port binding="tns:HelloWordSoapBinding" name="HelloWordImplPort">
<soap:address location="http://localhost:8080/HelloWord" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
这个文件中的portname为HelloWordImplPort,怎么调用的时候不是按这个文件来的?
private static final QName SERVICE_NAME = new QName("http://mypack.com/",
"HelloWord");
private static final QName PORT_NAME = new QName("http://mypack.com/",
"HelloWordPort");红色部分这个名字哪里来的????我请求的wsdl <?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions name="HelloWord" targetNamespace="http://mypack.com/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://mypack.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://mypack.com/" xmlns:tns="http://mypack.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="sayHi" type="tns:sayHi" />
- <xsd:complexType name="sayHi">
- <xsd:sequence>
<xsd:element minOccurs="0" name="name" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="sayHiResponse" type="tns:sayHiResponse" />
- <xsd:complexType name="sayHiResponse">
- <xsd:sequence>
<xsd:element minOccurs="0" name="return" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="sayHi">
<wsdl:part element="tns:sayHi" name="parameters" />
</wsdl:message>
- <wsdl:message name="sayHiResponse">
<wsdl:part element="tns:sayHiResponse" name="parameters" />
</wsdl:message>
- <wsdl:portType name="HelloWord">
- <wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHi" name="sayHi" />
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="HelloWordSoapBinding" type="tns:HelloWord">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document" />
- <wsdl:input name="sayHi">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="sayHiResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="HelloWord">
- <wsdl:port binding="tns:HelloWordSoapBinding" name="HelloWordImplPort">
<soap:address location="http://localhost:8080/HelloWord" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
这个文件中的portname为HelloWordImplPort,怎么调用的时候不是按这个文件来的?
解决方案 »
- 小白问题:求指教。谢谢
- [JSF]如何在HttpSessionListener中获取managedBean
- 如何把距离当前时间最近的图片都显示到前台页面上?
- 如何用JS取出这个<TD>里面所有的值?
- 在javascript中如何获取动态text中的值
- 哪里能下载到JSP连接ACCESS的驱动?
- windows2003 iis6 与resin整合后,.jsp 文件能够请求resin处理,.do 文件无法请求resin处理
- 有哪位知道google的IP,给兄弟分享一下,谢了!
- struts应用疑问
- 关于在server.xml中连接池几个比较特别的参数的配置?谢谢!!!!
- 求助后台效果,已完成巨大部分之差一小点
- 急!!!关于页面图片显示的问题!
你红色字体部分应该是:HelloWordImplPort吧?
HelloWordImplPort 才是PORT_NAME 吧?
显示的么?
我用AXIS第一:如果调用远程WSDL,PORTNAME如果写错了,一定会报错的
第二:如果远程WSDL是HelloWordImplPort,而调用的是本地WSDL文件,本地WSDL文件中PORTNAME如果是HelloWordPort,也是可以了哎 期待一个大侠指点一下了。。
恩 加载WSDL的时候一种方式是访问:http://xxxxxx:7001/xxxx?wsdl
另外一种就是把WSDL文件下载本地
然后从本地加载WSDL的文件呀