Kurt,
Thank you for your response. I will be mindful of where and how I post my
questions.
You are correct description is a required field and my soap request does
include it, but it still errors out. (It works if I remove the description
element or place it after the overviewUrl element)
<instanceDetails>
<overviewDoc>
<description>myExampleService
schema</description>
<overviewURL useType="XML
Schema">https://cypher.fgm.com/mdr/ns/myschema1.xsd</overviewURL>
</overviewDoc>
We are currently using a uddi client generated by axis from the spec and it
works with HP Systinet. We are looking to move to a open source
implementation, hence cannot make the change to uddi-client.
Regards,
Sonia
From: Kurt T Stam [mailto:[email protected]]
Sent: Tuesday, May 31, 2011 3:55 PM
To: [email protected]; Sanghavi, Sonia
Subject: Re: Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was
found starting with element 'overviewURL'. One of
'{"urn:uddi-org:api_v3":description}' is expected.
Oh and I forgot, as the fragment of the spec shows, 'description' is a required
field on OverviewDoc, which is what it
says in the error "One of '{"urn:uddi-org:api_v3":description}' is expected".
--Kurt
On 5/31/11 3:48 PM, Kurt T Stam wrote:
Hi Sonia,
1. Please sign up for the juddi user mailing list before posting or you will
not get a reply message.
2. Please don't cross post user and developer list of you will get replies in
different threads and locations
3. Your request is invalid as it has lots of question marks like xml:lang="?",
you need to either specify the language
or remove the entire attribute.
4. why not use the uddi-client, we generated it from the OASIS spec as well..
Thx,
--Kurt
On 5/31/11 3:05 PM, Sanghavi, Sonia wrote:
Hello,
I installed juddi-portal-bundle-3.0.4 zip. I am using a uddi client generated
from the Oasis uddi V3 spec for Publication/Inquiry and Subscription.
When I tried to publish my service it throws a fault :
Request :
===================================================================
POST http://localhost:8080/juddiv3/services/publish HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "save_service"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8080
Content-Length: 2105
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"<http://schemas.xmlsoap.org/soap/envelope/>
xmlns:urn="urn:uddi-org:api_v3"
xmlns:xd="http://www.w3.org/2000/09/xmldsig#"<http://www.w3.org/2000/09/xmldsig>>
<soapenv:Header/>
<soapenv:Body>
<urn:save_service>
<!--Optional:-->
<urn:authInfo>authtoken:e24463f7-20ad-4372-a68f-d2b26d6382e1</urn:authInfo>
<!--1 or more repetitions:-->
<urn:businessService
serviceKey="uddi:metadata.dod.mil:myExampleServicewithOwnIDSigned"
businessKey="uddi:juddi.apache.org:a49f060d-d976-4937-9abe-3f45388763f2">
<!--Zero or more repetitions:-->
<urn:name xml:lang="?">myExampleServicewithOwnID2</urn:name>
<!--Zero or more repetitions:-->
<urn:description xml:lang="?">Service Definition
Text</urn:description>
<bindingTemplates xmlns="urn:uddi-org:api_v3">
<bindingTemplate>
<accessPoint>http://www.fgm.com/endpoint1</accessPoint>
<tModelInstanceDetails>
<tModelInstanceInfo
tModelKey="uddi:uddi.org:transport:http">
<description>uddi:uddi.org:transport:http</description>
</tModelInstanceInfo>
<tModelInstanceInfo
tModelKey="uddi:metadata.dod.mil:CES:SD:tModels:1.1:serviceSchemaFile">
<instanceDetails>
<overviewDoc>
<description>myExampleService
schema</description>
<overviewURL useType="XML
Schema">https://cypher.fgm.com/mdr/ns/myschema1.xsd</overviewURL>
</overviewDoc>
</instanceDetails>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
</bindingTemplates>
</urn:businessService>
</urn:save_service>
</soapenv:Body>
</soapenv:Envelope>
Response:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 361
Date: Tue, 31 May 2011 18:39:52 GMT
Connection: close
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"<http://schemas.xmlsoap.org/soap/envelope/>><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Unmarshalling
Error: cvc-complex-type.2.4.a: Invalid content was found starting with element
'overviewURL'. One of '{"urn:uddi-org:api_v3":description}' is expected.
</faultstring></soap:Fault></soap:Body></soap:Envelope>
On further investigation I noticed that the OverviewDoc type as defined by
uddi_v3.xsd from Oasis has the schema type:
<xsd:complexType name="overviewDoc" final="restriction">
<xsd:choice>
<xsd:sequence>
<xsd:element
ref="uddi:description" maxOccurs="unbounded"/>
<xsd:element
ref="uddi:overviewURL" minOccurs="0"/>
</xsd:sequence>
<xsd:element
ref="uddi:overviewURL"/>
</xsd:choice>
</xsd:complexType>
The OverviewDoc type as defined by the juddi hosted service has the following
schema(notice how the sequence of overviewURL and description is switched):
<xs:complexType
name="overviewDoc"><http://localhost:8080/juddiv3/services/publish?wsdl><xs:sequence><http://localhost:8080/juddiv3/services/publish?wsdl><xs:element
name="overviewURL" type="tns:overviewURL" minOccurs="0"/><xs:element
name="description" type="tns:description" minOccurs="0"
maxOccurs="unbounded"/></xs:sequence></xs:complexType>
Is there a way to make the juddi hosted service conform/validate more closely
to the Oasis uddi v3 spec. In my request if I switch the position of the
overviewUrl and description it works. But I need it to work based on the Oasis
spec. Is there something I can change in juddi when it tries to validate the
request based on the schema?
I appreciate you looking into this. Please advice!
Regards,
Sonia Sanghavi