2
wsimport를 사용하여 외부 웹 서비스 용 클라이언트에 대한 Java 코드를 생성하려고합니다.xpath 오류 : jaxb 외부 바인딩 파일에 null이 있습니다.
wsimport가 작동하지 않도록 반복되는 속성 이름이 있으므로 외부 바인딩 파일을 만들었습니다. 내가 오류 XPath는 오류 받고 있어요 : 널 (null) 줄에 다음 4
내 바인딩 파일입니다
<jxb:bindings version="2.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jxb:bindings wsdlLocation="http://XXXXX.net/WebService/XXXXX.chc?wsdl" node="/xs:schema">
<jxb:bindings node="//xs:element[@name='elementname']">
<jxb:bindings node="//xs:element[@name='Option']">
<jxb:bindings node="//xs:complexType">
<jxb:bindings node=".//xs:attribute[@name='value']">
<jxb:property name="ValueToFixError1" />
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
내가의 schemaLocation으로 그러나 wsdlLocation을 교체하고 다른 오류 얻을 시도
: 일부 " http://XXXXX.net/WebService/XXXXX.chc?wsdl"을하지 않습니다 이 편집의. 이것은 " http://XXXXX.net/WebService/XXXXX.chc?wsdl#types?schema1"의 실수입니까? 또한 4 행에 있지만 #types? schema1을 URL에 추가하면 원래 오류로 돌아 가게됩니다. 그래서 내가 제안 잭스 - WS를 사용하려했지만, 나는 같은 오류와 함께 간다 :<jaxws:bindings
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
wsdlLocation="http://XXXXX.net/WebService/XXXXX.chc?wsdl">
<jaxws:bindings node="//definitions/types/xs:schema">
<jaxb:bindings node="//xs:element[@name='elementname']">
<jaxb:bindings node="//xs:element[@name='Option']">
<jaxb:bindings node="//xs:complexType">
<jaxb:bindings node=".//xs:attribute[@name='value']">
<jaxb:property name="ValueToFixError1" />
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
</jaxws:bindings>
</jaxws:bindings>
편집 : WSDL의 일부 추가 : 사용
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:cc" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:cc">
<types>
<xs:schema targetNamespace="urn:cc" xmlns:cc="urn:cc" elementFormDefault="qualified" attributeFormDefault="qualified">