Im triying to implement a simple BPEL process that should be able to accept as an input an element defined in an external XSD.
Im using Eclipse Oxigen.2 Release (4.7.2) and the Eclipse BPEL designer 1.05 Final, also i'm running the BPEL process in Apache ODE Server 1.3.7.
To achieve this im importing the XSD in the BPEL generated WSDL, but when i include this tag the apache ODE Console doesnt show the process if i quit the import tag the process is showed in the console and runs correctly.
As BPEL2.0 is based in WSDL1.1 i was following the WSDL1.1 specification in the Authoring Style part, but it seems to be an error in the example, because they use the wsdl:import to import a XSD. Trying to import the XSD in this way raise a validation error in eclipse.
I found this answer that points to this link that states the error in WSDL1.1 specification:
Some examples in WSDL 1.1 incorrectly show the WSDL import statement
being used to import XML Schema definitions. The Profile clarifies use
of the import mechanisms to keep them consistent and confined to their
respective domains. Imported schema documents are also constrained by
XML version and encoding requirements consistent to those of the
importing WSDL documents.
R2001 A DESCRIPTION MUST only use the WSDL "import" statement to
import another WSDL description.
R2803 In a DESCRIPTION, the namespace attribute of the wsdl:import
MUST NOT be a relative URI.
R2002 To import XML Schema Definitions, a DESCRIPTION MUST use the XML
Schema "import" statement.
R2003 A DESCRIPTION MUST use the XML Schema "import" statement only
within the xsd:schema element of the types section.
R2004 In a DESCRIPTION the schemaLocation attribute of an xsd:import
element MUST NOT resolve to any document whose root element is not
"schema" from the namespace "http://www.w3.org/2001/XMLSchema".
R2009 An XML Schema directly or indirectly imported by a DESCRIPTION
MAY include the Unicode Byte Order Mark (BOM).
R2010 An XML Schema directly or indirectly imported by a DESCRIPTION
MUST use either UTF-8 or UTF-16 encoding.
R2011 An XML Schema directly or indirectly imported by a DESCRIPTION
MUST use version 1.0 of the eXtensible Markup Language W3C
Recommendation.
So with the above information, rigth now i have:
1. XSD Sxhema
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ccts="urn:un:unece:uncefact:documentation:2"
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.1">
<!-- ===== Imports ===== -->
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
schemaLocation="../common/UBL-CommonAggregateComponents-2.1.xsd"/>
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
schemaLocation="../common/UBL-CommonBasicComponents-2.1.xsd"/>
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
schemaLocation="../common/UBL-CommonExtensionComponents-2.1.xsd"/>
<!-- ===== Element Declarations ===== -->
<xsd:element name="OrderCancellation" type="OrderCancellationType">
<xsd:annotation>
<xsd:documentation>This element MUST be conveyed as the root element in any instance document based on this Schema expression</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!-- ===== Type Definitions ===== -->
<xsd:complexType name="OrderCancellationType">
<xsd:annotation>
<xsd:documentation>
<ccts:Component>
<ccts:ComponentType>ABIE</ccts:ComponentType>
<ccts:DictionaryEntryName>Order Cancellation. Details</ccts:DictionaryEntryName>
<ccts:Definition>A document used to cancel an entire Order.</ccts:Definition>
<ccts:ObjectClass>Order Cancellation</ccts:ObjectClass>
</ccts:Component>
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="cbc:IssueDate" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<ccts:Component>
<ccts:ComponentType>BBIE</ccts:ComponentType>
<ccts:DictionaryEntryName>Order Cancellation. Issue Date. Date</ccts:DictionaryEntryName>
<ccts:Definition>The date, assigned by the sender, on which this document was issued.</ccts:Definition>
<ccts:Cardinality>1</ccts:Cardinality>
<ccts:ObjectClass>Order Cancellation</ccts:ObjectClass>
<ccts:PropertyTerm>Issue Date</ccts:PropertyTerm>
<ccts:RepresentationTerm>Date</ccts:RepresentationTerm>
<ccts:DataType>Date. Type</ccts:DataType>
</ccts:Component>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="cbc:IssueTime" minOccurs="0" maxOccurs="1">
<xsd:annotation>
...
</xsd:annotation>
</xsd:element>
<xsd:element ref="cbc:Note" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
...
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
2. Generated WSDL of BPEL Process
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://br.ufsc.das.ubl"
xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2"
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
xmlns:wsdl="http://service.endpoint.br.ufsc.das/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="OrderingUBL"
targetNamespace="http://br.ufsc.das.ubl">
<!--
Added XSD namespace
xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2"
-->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE DEFINITION - List of types participating in this BPEL process
The BPEL Designer will generate default request and response types
but you can define or import any XML Schema type and use them as part
of the message types.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<plnk:partnerLinkType name="IntegratorEndPoint_PLT">
<plnk:role name="IntegratorEndPoint_Role" portType="wsdl:IntegrationEndPointImpl"/>
</plnk:partnerLinkType>
<import location="file:/C:/my/path/IntegrationEndpoint.wsdl" namespace="http://service.endpoint.br.ufsc.das/"/>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://br.ufsc.das.ubl">
<!--Importing the XSD file-->
<import
namespace="urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2"
schemaLocation="file:/C:/UBL-2.1/xsd/maindoc/UBL-OrderCancellation-2.xsd" />
<element name="OrderingUBLRequest">
<complexType>
<sequence>
<!-- Defining the Type of element OrderingUBLRequest
to be the element in the imported XSD
-->
<element name="input" type="ubl:OrderCancellationType" />
</sequence>
</complexType>
</element>
<element name="OrderingUBLResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MESSAGE TYPE DEFINITION - Definition of the message types used as
part of the port type defintions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<message name="OrderingUBLRequestMessage">
<part element="tns:OrderingUBLRequest" name="payload"/>
</message>
<message name="OrderingUBLResponseMessage">
<part element="tns:OrderingUBLResponse" name="payload"/>
</message>
<!--
.
. All the other WSDL tags
.
-->
</definitions>
QUESTION
Am I missing something importing the XSD in the WSDL BPEL file and run it in Apache ODE?
Related
I'm new to using xml, and having trouble figuring this out. I found a schema for the RSS spec online, and I can generate java classes from that self-contained schema using xjc without issues.
I want to add fields from simpledc.xsd because in RSS feeds, I'm seeing tags like dc:creator on <items>, and I'd like to set it up so code generation for that can work too. In my attempt, I added the xsd:include for the dc schema, and added a field to the item definition.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- My addition -->
<xsd:include schemaLocation="simpledc.xsd" />
<xsd:element name="rss" type="rss" />
<xsd:complexType name="rss">
<xsd:sequence>
<xsd:element name="channel" type="channel" maxOccurs="1"
minOccurs="1" />
...
<xsd:complexType name="item">
<xsd:sequence>
<xsd:element name="title" type="xsd:string" maxOccurs="1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
The title of the item.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
...
<!-- My addition -->
<xsd:element name="creator" type="dc:creator" maxOccurs="1" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
Intellij provides the error:
Cannot resolve symbol 'dc:creator'
And xjc also provides a similar error:
$ xjc -p com.test.generated -d src/main/java/ src/main/resources/schemas/rss.xsd
parsing a schema...
[ERROR] s4s-att-invalid-value: Invalid attribute value for 'type' in element 'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 'dc:creator' as a QName: the prefix 'dc' is not declared.
line 391 of file:/<project>/src/main/resources/schemas/rss.xsd
How do I set this up properly so that I can add elements with the dc namespace in my xml schema, and have codegen work properly?
I figured out how to do this. I used an include where I should have used an import because I was referencing a different namespace. And then for the element from the different namespace, I need to use a ref to link to them:
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsd:import schemaLocation="dc.xsd" namespace="http://purl.org/dc/elements/1.1/"/>
...
<xsd:complexType name="item">
<xsd:sequence>
...
<!-- My addition -->
<xsd:element minOccurs="0" ref="dc:creator" />
</xsd:sequence>
</xsd:complexType>
I'm not sure what the intent of the simpledc.xsd provided by the dublin core website. Using dc.xsd seems to work for generating the schema.
Unfortunately, when you're trying to unmarshall xml according to this schema, it seems that the rss feed author needs to add xmlns fields at the top level <rss> element, and they mostly do not.
My wsdl specification contains imported XSD schema.
wsdl file looks like below
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" ....>
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd2" namespace="http://tempuri.org/"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svcc?xsd=xsd4" namespace="http://schemas.datacontract.org/2004/07/System.Web.Services.Protocols"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd0" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd1" namespace="http://schemas.datacontract.org/2004/07/ABCUser.Web.Services"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/ABCUser.Web.ServiceModels"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd5" namespace="http://schemas.datacontract.org/2004/07/System"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd6" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd7" namespace="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd8" namespace="http://schemas.datacontract.org/2004/07/ABC.Fs.UIEntities"/>
<xsd:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd9"/>
</xsd:schema>
</wsdl:types>
.......
</wsdl:definitions>
My jaxb bindings file look like below:
<jaxws:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"
wsdlLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?wsdl">
<enableWrapperStyle>true</enableWrapperStyle>
<enableAsyncMapping>false</enableAsyncMapping>
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema/xs:complexType[#name='Node']/xs:sequence/xs:element[#name='Type']">
<jaxb:class name="NodeTypeString"/>
</jaxws:bindings>
</jaxws:bindings>
If I don't use bindings.xml, I get following error while generating java classes through wsimport
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1 of https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd3
[ERROR] (Related to above error) This is the other declaration.
line 1 of https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd3
Schema it is complaining about looks like below
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/ABCUser.Web.ServiceModels" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/ABCUser.Web.ServiceModels">
<xs:import schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd6" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
.......
<xs:complexType name="Node">
<xs:sequence>
<xs:element minOccurs="0" name="Description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Name" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Type" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Users" nillable="true" type="tns:ArrayOfUser"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Node" nillable="true" type="tns:Node"/>
......
But now when I use bindings.xml, I get the following error
[ERROR] XPath evaluation of "wsdl:definitions/wsdl:types/xs:schema/xs:complexType[#name='Node']/xs:sequence/xs:element[#name='Type']" results in an empty target node
line 8 of file:/E:/projects/codegeneration/bindings.xml
What am I missing? I am using wsimport to generate the classes.
<xsd:import> does not actually change the WSDL file’s XML document tree. You have elements matching wsdl:definitions/wsdl:types/xs:schema/xs:import, not wsdl:definitions/wsdl:types/xs:schema/xs:complexType/xs:sequence/xs:element.
The JAX-WS specification’s “Customizations” chapter says:
Additionally, jaxb:bindings MAY appear inside a JAX-WS external binding file as a child of a jaxws:bindings element whose node attribute points to a xs:schema element inside a WSDL document. When the schema is processed, the outcome MUST be as if the jaxb:bindings element was inlined inside the schema document as an annotation on the schema component.
While processing a JAXB binding declaration (i.e. a jaxb:bindings element) for a schema document embedded inside a WSDL document, all XPath expressions that appear inside it MUST be interpreted as if the containing xs:schema element was the root of a standalone schema document.
So, your inner jaxws:bindings element must contain the XPath of the xs:schema element, not any of its descendants:
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema">
<jaxb:bindings node="xs:complexType[#name='Node']/xs:sequence/xs:element[#name='Type']">
<jaxb:class name="NodeTypeString"/>
</jaxb:bindings>
</jaxws:bindings>
I’m not sure if the above will actually work with a schema that uses <xsd:import>. You may have to refer to the imported schema explicitly:
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema">
<jaxb:bindings schemaLocation="https://abcserver.com/v2/two-way-ssl/MyService.svc?xsd=xsd2">
<jaxb:bindings node="xs:complexType[#name='Node']/xs:sequence/xs:element[#name='Type']">
<jaxb:class name="NodeTypeString"/>
</jaxb:bindings>
</jaxb:bindings>
</jaxws:bindings>
I got two solutions for this issue I was facing.
I streamlined the wsdl schema by adding imported schema in it and removing import statements.
First build an episode using xjc for imported schema
xjc -episode myschema.episode myschema.xsd
And then use that episode as a binding in java classes generation through wsimport
wsimport mywsdl.wsdl -b myschema.episode
More about 2nd solution here
In my Java (Maven) project I'm using JAXB 2.2.11 to rebuild instances of a class from an XML payload received by our servers. I have an .xsd schema defining the class, which works great in conjunction with JAXB to rebuild an instance of the type I want. The issue I'm having is that those payloads can (without any notice or warning) have extra elements which I don't really care about.
One of the places where those extra elements can appear is within an xs:all tag. I do like having the functionality of said xs:all tag:
The all element specifies that the child elements can appear in any
order and that each child element can occur zero or one time.
However, I don't want to get a parsing error while processing an XML payload that contains extra attributes. An xs:any tag inside the xs:all would work great, but it's not permitted in XSD 1.0 (according to w3schools and this other SO answer) and apparently, JAXB doesn't support XSD 1.1. Also, the way JAXB treats the any or the anyAttribute is very interesting, because it puts all the unknown nodes into a map, so I can log it saying "Hey! We are receiving an attribute that we don't really care about as of now, but maybe you'll find it somehow useful in the future?"
I've read about Xsom, that supports XSD 1.1, but apparently, it doesn't return an instance of the class you want, but more generic set of hash-maps and lists, therefore losing my type checking, which is something I don't want to.
So... Is there any way of pretending to have an xs:any within an xs:all?
Correct. XSD 1.0 does not allow xsd:any within xsd:all; XSD 1.1 does.
Workarounds for XSD 1.0 not allowing xsd:any in xsd:all
Confine xsd:any to a fixed wrapper element such as expansion with xsd:all:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="root">
<xsd:complexType>
<xsd:all>
<xsd:element name="a"/>
<xsd:element name="b"/>
<xsd:element name="expansion">
<xsd:complexType>
<xsd:sequence>
<xsd:any maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Abandon the unordered allowance of xsd:all and let the xsd:any elements follow in sequence:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="a"/>
<xsd:element name="b"/>
<xsd:any maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
We are new users to xsd, and we try to validate a xsd file that needs to import another.
We are trying to do an import from companyInfos.xsd to employmentrecord.xsd.
Here are the two xsd files we are dealing with.
employmentrecord.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ci="companyInfos.xsd"
targetNamespace="er"
elementFormDefault="qualified">
<xsd:import namespace="ci" schemaLocation="companyInfos.xsd" />
<xsd:element name="employment">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="ci:company"/>
<xsd:element name="position" type="xsd:string"/>
<xsd:element name="duration" type="xsd:string"/>
<xsd:element name="dateStart" type="xsd:date"/>
<xsd:element name="current" type="xsd:booolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
companyInfos.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="ci" elementFormDefault="qualified">
<xsd:element name="company">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="companyName" type="xsd:string"/>
<xsd:element name="foundationDate" type="xsd:date"/>
<xsd:element name="field" type="xsd:string"/>
<xsd:element name="employeeCount" type="xsd:integer"/>
<xsd:element name="logo" type="xsd:anyURI"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="httpLink" type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
We got the following error in the terminal when trying the validity:
org.xml.sax.SAXParseException; systemId: file:///home/jiby/Dropbox/ID2208_shared%20with%20JB/SampleParser/ID2208_hw1/xml/employmentrecord.xsd;
It was detected that 'ci:company' is in namespace 'companyInfos.xsd', but components from this namespace are not referenceable from schema document 'file:///home/jiby/Dropbox/ID2208_shared%20with%20JB/SampleParser/ID2208_hw1/xml/employmentrecord.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ci:company' needs to be changed.
If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///home/jiby/Dropbox/ID2208_shared%20with%20JB/SampleParser/ID2208_hw1/xml/employmentrecord.xsd'.
(I don't know if it can be useful, but here are the two xml files)
<?xml version="1.0" encoding="UTF-8"?>
<employment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="er"
xmlns:ci="companyInfos.xsd"
>
<ci:company>
<companyName>
Google
</companyName>
<foundationDate>
1995-09-15
</foundationDate>
<field>
Search engine
</field>
<employeeCount>
40000
</employeeCount>
<logo>
http://static3.wikia.nocookie.net/__cb20100520131748/logopedia/images/5/5c/Google_logo.png
</logo>
<description>
Google is an American multinational corporation specializing in Internet-related services and products. These include search, cloud computing, software, and online advertising technologies
</description>
</ci:company>
<position>Chief Finantial Opportunist</position>
<duration>1 year</duration>
<dateStart>2012-01-01</dateStart>
<current>false</current>
</employment>
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="ci">
<companyName>
Google
</companyName>
<foundationDate>
1995-09-15
</foundationDate>
<field>
Search engine
</field>
<employeeCount>
40000
</employeeCount>
<logo>
http://static3.wikia.nocookie.net/__cb20100520131748/logopedia/images/5/5c/Google_logo.png
</logo>
<description>
Google is an American multinational corporation specializing in Internet-related services and products. These include search, cloud computing, software, and online advertising technologies
</description>
<httpLink>http://google.com</httpLink>
</company>
We tried to look on the forums for an answer but the proposed solutions didn't seem to work, the file always had some issues for validation.
I think you are confused between namespace prefixes and namespace URIs. The namespace attribute of xs:importSchema and the targetNamespace attribute of xs:schema should both be URIs, and they should match. You should also bind a prefix to this URI and use this prefix in any references to names from the imported schema namespace.
I am trying to consume a Java Webservice using Visual Basic.net. I am getting an error on deserialization "Cannot assign object of type System.Xml.XmlNode[] to an object of type System.String".
What I have been reading is that the wsdl specification may not conform to the WS-I BP 1.1 specification. Link Here
The other solution talked about here is to change the response xml to conform to a .net datatype. I have tried to do this for other reasons a couple of years back and it proved to be unstable.
A snippet of the wsdl is this:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ws.interfaces.sessions.APILink.amdocs"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://ws.interfaces.sessions.APILink.amdocs"
xmlns:intf="http://ws.interfaces.sessions.APILink.amdocs"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns2="http://io.datainfo.APILink.amdocs"
xmlns:tns3="http://datainfo.APILink.amdocs"
xmlns:tns4="http://awsi.amdocs.com"
xmlns:tns5="http://exceptions.APILink.amdocs"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<complexType name="InPersonInfo">
<complexContent>
<extension base="tns2:BaseInputOutputInfo">
<sequence>
<element maxOccurs="1" minOccurs="0" name="mItem1" type="xsd:int"/>
<element maxOccurs="1" minOccurs="0" name="mID" nillable="true" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="mPersonType" type="tns4:char"/>
</sequence>
</extension>
</complexContent>
</complexType>
The other pieces from the WSDL I am seeing is just the message and operation sections.
EDIT 2011-04-21: This question mentions what I am going through.
I am not familiar with java what I know is that it is being created/consumed with AXIS or SOAPUI and somehow it is not creating the WSDL according to standard and there is my problem. If I find an answer to solve it I will post it here.