简体   繁体   English

将xsd位置添加到axis2 wsdl以获取html编码的返回值

[英]add xsd location to axis2 wsdl for html encoded return values

I have seen similar questions but none of them solved my problem unfortunately. 我见过类似的问题,但不幸的是没有一个解决了我的问题。

I automatically create my web service using Axis2 (1.6.2) in Eclipse Kepler - I dont create any wsdl or xsd files, just the web service class and use New -> Web Service. 我在Eclipse Kepler中使用Axis2(1.6.2)自动创建Web服务-我不创建任何wsdl或xsd文件,仅创建Web服务类并使用New-> Web Service。 3 endpoints are generated as 3个端点生成为

  • HttpEndpoint HttpEndpoint
  • HttpSoap11EndPoint HttpSoap11EndPoint
  • HtppSoap12EndPoint HtppSoap12EndPoint

I can consume my or any ws using axis2. 我可以使用axis2消耗我的或任何ws。 However, some people who try to use my ws with JAX-WS in netbeans gets return values -which are xml as string- html encoded and this is because (or they think it is) my xsd file location is not specified in my wsdl link. 但是,某些尝试在netbeans中将我的ws与JAX-WS一起使用的人会获得返回值-将其作为xml字符串进行html编码,这是因为(或者他们认为是)我的wsdl链接中未指定我的xsd文件位置。

When I check my WSDL link, I dont see the xsd file location included but all return values are specified for each of the functions. 当我检查WSDL链接时,看不到xsd文件位置,但是为每个函数都指定了所有返回值。 I can also reach my xsd file simply by writing ?xsd instead of ?wsdl at the end of my service link and as I said, I have no problem using them. 我还可以通过在服务链接的末尾编写?xsd而不是?wsdl来访问xsd文件,正如我所说,使用它们没有问题。

I tried to use include and import tags in services.xml but still xsd location is not included in wsdl. 我尝试在services.xml中使用include和import标签,但wsdl中仍不包含xsd位置。

  • Is this encoding issue caused by my ws creation or the way it is consumed? 这个编码问题是由我的ws创建或使用方式引起的吗?

  • If I need to add the xsd location (which is simply ?xsd instead of ?wsdl), how can I add the location to my wsdl - without creating the whole wsdl file myself? 如果需要添加xsd位置(简称为?xsd而不是?wsdl),如何将位置添加到wsdl中-而不自己创建整个wsdl文件?

  • If this is caused by the way ws is consumed, is there a solution for the consumer beside html decoding or string.replaceall ? 如果这是由消耗ws的方式引起的,那么除了html解码或string.replaceall之外,消费者是否有解决方案?

Thanks in advance 提前致谢

Problem solved, It wasn't about adding an xsd but rather the return type. 问题解决了,这不是要添加xsd而是返回类型。 I changed the return to a class and complexType created automatically, including xsd location. 我将返回值更改为自动创建的类和complexType,包括xsd位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM