开发者

Write xsd:type attribute in Apache XmlBeans

开发者 https://www.devze.com 2023-02-17 13:57 出处:网络
About Apache XmlBeans. I use AnyType in scheme definition (xsd:anyType) as element in complex type. 开发者_运维百科Example:

About Apache XmlBeans. I use AnyType in scheme definition (xsd:anyType) as element in complex type. 开发者_运维百科Example:

<request xmlns="">    
<xml>
  <input1>
    <string>str</string>
  </input1>
</xml>
</request>

in java code

final ProcessRequest processRequest = requestDocument.addNewRequest();
XmlObject xml = processRequest.addNewXml();
xml.changeType(operationType.type);
xml.set(operationType);

and i want to see

<xml xsd:type="*opeation1NSPrefix*:*operation1Type*>
...
</xml>

but i see only <xml/>. What i doing wrong?


stupid mistake: operation1 define as anonymous type <element><complexType>..</></> in wsdl. when i define "<element type=".."/><complexType name=".."/> the problem disappeared

0

精彩评论

暂无评论...
验证码 换一张
取 消