[vwnc] XML unmarshaling, preserve namespaces

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] XML unmarshaling, preserve namespaces

Steffen Märcker
Hi,

I'd like to unmarshal some xml and wonder how to preserve the namespace of  
certain elements. For example take this xmi snipped

<XMI xmlns:UML="org.omg.xmi.namespace.UML">
[...]
<XMI.content>
        <UML:Model ...>

Using the primitive binding below, I get the desired structs, but the name  
attribute of the Model corresponding struct does neither contain the  
namespace nor the qualifier. How can I configure the binding to extract  
this information too? Is there some documentation covering this topic?

Thanks a lot!
Steffen

Binding:


<?xml version="1.0" encoding="UTF-8"?>
<schemaBindings>
        <xmlToSmalltalkBinding name="CPN" targetNamespace=""  
defaultClassNamespace="Smalltalk" xmlns="urn:visualworks:VWSchemaBinding"  
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

                <struct name="XMI">
                        <element name="XMI.header" ref="XMI.header"/>
                        <element name="XMI.content" ref="XMI.content"/>
                </struct>
               
                <struct name="XMI.header">
                </struct>
               
                <struct name="XMI.content">
                        <element name="Model" ref="Model"/>
                </struct>
               
                <struct name="Model">
                        <attribute name="xmi.id" minOccurs="1" aspect="id" ref="xsd:string"/>
                </struct>

        </xmlToSmalltalkBinding>
</schemaBindings>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] XML unmarshaling, preserve namespaces

Kogan, Tamara
Hi Steffen,

Try the following binding and see if it works for you:

> <?xml version="1.0" encoding="UTF-8"?>
> <schemaBindings>
> <xmlToSmalltalkBinding name="CPN" targetNamespace=""  

xmlns:UML="org.omg.xmi.namespace.UML"

> defaultClassNamespace="Smalltalk"
> xmlns="urn:visualworks:VWSchemaBinding"  
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> <struct name="XMI">
> <element name="XMI.header" ref="XMI.header"/>
> <element name="XMI.content" ref="XMI.content"/>
> </struct>
>
> <struct name="XMI.header">
> </struct>
>
> <struct name="XMI.content">
> <element name="Model" ref="Model"/>
> </struct>
>
       
 <struct name="UML:Model">

> <attribute name="xmi.id" minOccurs="1"
> aspect="id" ref="xsd:string"/>
> </struct>
>
> </xmlToSmalltalkBinding>
> </schemaBindings>

Tamara Kogan
Smalltalk development,
Cincom Systems
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Steffen Märcker
> Sent: Tuesday, October 06, 2009 8:25 AM
> To: vwnc
> Subject: [vwnc] XML unmarshaling, preserve namespaces
>
> Hi,
>
> I'd like to unmarshal some xml and wonder how to preserve the
> namespace of  
> certain elements. For example take this xmi snipped
>
> <XMI xmlns:UML="org.omg.xmi.namespace.UML">
> [...]
> <XMI.content>
> <UML:Model ...>
>
> Using the primitive binding below, I get the desired structs,
> but the name  
> attribute of the Model corresponding struct does neither contain the  
> namespace nor the qualifier. How can I configure the binding
> to extract  
> this information too? Is there some documentation covering this topic?
>
> Thanks a lot!
> Steffen
>
> Binding:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <schemaBindings>
> <xmlToSmalltalkBinding name="CPN" targetNamespace=""  
> defaultClassNamespace="Smalltalk"
> xmlns="urn:visualworks:VWSchemaBinding"  
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> <struct name="XMI">
> <element name="XMI.header" ref="XMI.header"/>
> <element name="XMI.content" ref="XMI.content"/>
> </struct>
>
> <struct name="XMI.header">
> </struct>
>
> <struct name="XMI.content">
> <element name="Model" ref="Model"/>
> </struct>
>
> <struct name="Model">
> <attribute name="xmi.id" minOccurs="1"
> aspect="id" ref="xsd:string"/>
> </struct>
>
> </xmlToSmalltalkBinding>
> </schemaBindings>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] XML unmarshaling, preserve namespaces

Steffen Märcker
Hi Tamara,

thank you for your fast answer. Unforunately it leads to a  
WebServices.UnresolvedReferenceSignal. Have I missed something important?  
I've attached the two files in question, perhaps they're helpful.

Ciao, Steffen



Am 06.10.2009, 15:09 Uhr, schrieb Kogan, Tamara <[hidden email]>:

> Hi Steffen,
>
> Try the following binding and see if it works for you:
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <schemaBindings>
>> <xmlToSmalltalkBinding name="CPN" targetNamespace=""
>
> xmlns:UML="org.omg.xmi.namespace.UML"
>
>> defaultClassNamespace="Smalltalk"
>> xmlns="urn:visualworks:VWSchemaBinding"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>
>> <struct name="XMI">
>> <element name="XMI.header" ref="XMI.header"/>
>> <element name="XMI.content" ref="XMI.content"/>
>> </struct>
>>
>> <struct name="XMI.header">
>> </struct>
>>
>> <struct name="XMI.content">
>> <element name="Model" ref="Model"/>
>> </struct>
>>
>
>  <struct name="UML:Model">
>
>> <attribute name="xmi.id" minOccurs="1"
>> aspect="id" ref="xsd:string"/>
>> </struct>
>>
>> </xmlToSmalltalkBinding>
>> </schemaBindings>
>
> Tamara Kogan
> Smalltalk development,
> Cincom Systems
>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of Steffen Märcker
>> Sent: Tuesday, October 06, 2009 8:25 AM
>> To: vwnc
>> Subject: [vwnc] XML unmarshaling, preserve namespaces
>>
>> Hi,
>>
>> I'd like to unmarshal some xml and wonder how to preserve the
>> namespace of
>> certain elements. For example take this xmi snipped
>>
>> <XMI xmlns:UML="org.omg.xmi.namespace.UML">
>> [...]
>> <XMI.content>
>> <UML:Model ...>
>>
>> Using the primitive binding below, I get the desired structs,
>> but the name
>> attribute of the Model corresponding struct does neither contain the
>> namespace nor the qualifier. How can I configure the binding
>> to extract
>> this information too? Is there some documentation covering this topic?
>>
>> Thanks a lot!
>> Steffen
>>
>> Binding:
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <schemaBindings>
>> <xmlToSmalltalkBinding name="CPN" targetNamespace=""
>> defaultClassNamespace="Smalltalk"
>> xmlns="urn:visualworks:VWSchemaBinding"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>
>> <struct name="XMI">
>> <element name="XMI.header" ref="XMI.header"/>
>> <element name="XMI.content" ref="XMI.content"/>
>> </struct>
>>
>> <struct name="XMI.header">
>> </struct>
>>
>> <struct name="XMI.content">
>> <element name="Model" ref="Model"/>
>> </struct>
>>
>> <struct name="Model">
>> <attribute name="xmi.id" minOccurs="1"
>> aspect="id" ref="xsd:string"/>
>> </struct>
>>
>> </xmlToSmalltalkBinding>
>> </schemaBindings>
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

test.xmi (26K) Download Attachment
xmi_binding.xml (714 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] XML unmarshaling, preserve namespaces

Kogan, Tamara

> -----Original Message-----
> From: Steffen Märcker [mailto:[hidden email]]
> Sent: Tuesday, October 06, 2009 10:30 AM
> To: Kogan, Tamara; vwnc
> Subject: Re: [vwnc] XML unmarshaling, preserve namespaces
>
> Hi Tamara,
>
> thank you for your fast answer. Unforunately it leads to a  
> WebServices.UnresolvedReferenceSignal. Have I missed
> something important?  

You need fully qualified reference to Model.
       
                <struct name="XMI.content">
                        <element name="Model" ref="UML:Model"/>
                </struct>
               
                <struct name="UML:Model">
                        <attribute name="xmi.id" minOccurs="1" aspect="id" ref="xsd:string"/>
                </struct>

HTH,
Tamara


> I've attached the two files in question, perhaps they're helpful.
>
> Ciao, Steffen
>
>
>
> Am 06.10.2009, 15:09 Uhr, schrieb Kogan, Tamara <[hidden email]>:
>
> > Hi Steffen,
> >
> > Try the following binding and see if it works for you:
> >
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <schemaBindings>
> >> <xmlToSmalltalkBinding name="CPN" targetNamespace=""
> >
> > xmlns:UML="org.omg.xmi.namespace.UML"
> >
> >> defaultClassNamespace="Smalltalk"
> >> xmlns="urn:visualworks:VWSchemaBinding"
> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >>
> >> <struct name="XMI">
> >> <element name="XMI.header" ref="XMI.header"/>
> >> <element name="XMI.content" ref="XMI.content"/>
> >> </struct>
> >>
> >> <struct name="XMI.header">
> >> </struct>
> >>
> >> <struct name="XMI.content">
> >> <element name="Model" ref="Model"/>
> >> </struct>
> >>
> >
> >  <struct name="UML:Model">
> >
> >> <attribute name="xmi.id" minOccurs="1"
> >> aspect="id" ref="xsd:string"/>
> >> </struct>
> >>
> >> </xmlToSmalltalkBinding>
> >> </schemaBindings>
> >
> > Tamara Kogan
> > Smalltalk development,
> > Cincom Systems
> >
> >> -----Original Message-----
> >> From: [hidden email]
> >> [mailto:[hidden email]] On Behalf Of Steffen Märcker
> >> Sent: Tuesday, October 06, 2009 8:25 AM
> >> To: vwnc
> >> Subject: [vwnc] XML unmarshaling, preserve namespaces
> >>
> >> Hi,
> >>
> >> I'd like to unmarshal some xml and wonder how to preserve the
> >> namespace of
> >> certain elements. For example take this xmi snipped
> >>
> >> <XMI xmlns:UML="org.omg.xmi.namespace.UML">
> >> [...]
> >> <XMI.content>
> >> <UML:Model ...>
> >>
> >> Using the primitive binding below, I get the desired structs,
> >> but the name
> >> attribute of the Model corresponding struct does neither
> contain the
> >> namespace nor the qualifier. How can I configure the binding
> >> to extract
> >> this information too? Is there some documentation covering
> this topic?
> >>
> >> Thanks a lot!
> >> Steffen
> >>
> >> Binding:
> >>
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <schemaBindings>
> >> <xmlToSmalltalkBinding name="CPN" targetNamespace=""
> >> defaultClassNamespace="Smalltalk"
> >> xmlns="urn:visualworks:VWSchemaBinding"
> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >>
> >> <struct name="XMI">
> >> <element name="XMI.header" ref="XMI.header"/>
> >> <element name="XMI.content" ref="XMI.content"/>
> >> </struct>
> >>
> >> <struct name="XMI.header">
> >> </struct>
> >>
> >> <struct name="XMI.content">
> >> <element name="Model" ref="Model"/>
> >> </struct>
> >>
> >> <struct name="Model">
> >> <attribute name="xmi.id" minOccurs="1"
> >> aspect="id" ref="xsd:string"/>
> >> </struct>
> >>
> >> </xmlToSmalltalkBinding>
> >> </schemaBindings>
> >>
> >> _______________________________________________
> >> vwnc mailing list
> >> [hidden email]
> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] XML unmarshaling, preserve namespaces

Steffen Märcker
Hi Tamara,

thank you very much, I've just overlooked that. =)

THX,
Steffen



Am 06.10.2009, 17:56 Uhr, schrieb Kogan, Tamara <[hidden email]>:

>
>> -----Original Message-----
>> From: Steffen Märcker [mailto:[hidden email]]
>> Sent: Tuesday, October 06, 2009 10:30 AM
>> To: Kogan, Tamara; vwnc
>> Subject: Re: [vwnc] XML unmarshaling, preserve namespaces
>>
>> Hi Tamara,
>>
>> thank you for your fast answer. Unforunately it leads to a
>> WebServices.UnresolvedReferenceSignal. Have I missed
>> something important?
>
> You need fully qualified reference to Model.
>
> <struct name="XMI.content">
> <element name="Model" ref="UML:Model"/>
> </struct>
>
> <struct name="UML:Model">
> <attribute name="xmi.id" minOccurs="1" aspect="id" ref="xsd:string"/>
> </struct>
>
> HTH,
> Tamara
>
>
>> I've attached the two files in question, perhaps they're helpful.
>>
>> Ciao, Steffen
>>
>>
>>
>> Am 06.10.2009, 15:09 Uhr, schrieb Kogan, Tamara <[hidden email]>:
>>
>> > Hi Steffen,
>> >
>> > Try the following binding and see if it works for you:
>> >
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <schemaBindings>
>> >> <xmlToSmalltalkBinding name="CPN" targetNamespace=""
>> >
>> > xmlns:UML="org.omg.xmi.namespace.UML"
>> >
>> >> defaultClassNamespace="Smalltalk"
>> >> xmlns="urn:visualworks:VWSchemaBinding"
>> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> >>
>> >> <struct name="XMI">
>> >> <element name="XMI.header" ref="XMI.header"/>
>> >> <element name="XMI.content" ref="XMI.content"/>
>> >> </struct>
>> >>
>> >> <struct name="XMI.header">
>> >> </struct>
>> >>
>> >> <struct name="XMI.content">
>> >> <element name="Model" ref="Model"/>
>> >> </struct>
>> >>
>> >
>> >  <struct name="UML:Model">
>> >
>> >> <attribute name="xmi.id" minOccurs="1"
>> >> aspect="id" ref="xsd:string"/>
>> >> </struct>
>> >>
>> >> </xmlToSmalltalkBinding>
>> >> </schemaBindings>
>> >
>> > Tamara Kogan
>> > Smalltalk development,
>> > Cincom Systems
>> >
>> >> -----Original Message-----
>> >> From: [hidden email]
>> >> [mailto:[hidden email]] On Behalf Of Steffen Märcker
>> >> Sent: Tuesday, October 06, 2009 8:25 AM
>> >> To: vwnc
>> >> Subject: [vwnc] XML unmarshaling, preserve namespaces
>> >>
>> >> Hi,
>> >>
>> >> I'd like to unmarshal some xml and wonder how to preserve the
>> >> namespace of
>> >> certain elements. For example take this xmi snipped
>> >>
>> >> <XMI xmlns:UML="org.omg.xmi.namespace.UML">
>> >> [...]
>> >> <XMI.content>
>> >> <UML:Model ...>
>> >>
>> >> Using the primitive binding below, I get the desired structs,
>> >> but the name
>> >> attribute of the Model corresponding struct does neither
>> contain the
>> >> namespace nor the qualifier. How can I configure the binding
>> >> to extract
>> >> this information too? Is there some documentation covering
>> this topic?
>> >>
>> >> Thanks a lot!
>> >> Steffen
>> >>
>> >> Binding:
>> >>
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <schemaBindings>
>> >> <xmlToSmalltalkBinding name="CPN" targetNamespace=""
>> >> defaultClassNamespace="Smalltalk"
>> >> xmlns="urn:visualworks:VWSchemaBinding"
>> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> >>
>> >> <struct name="XMI">
>> >> <element name="XMI.header" ref="XMI.header"/>
>> >> <element name="XMI.content" ref="XMI.content"/>
>> >> </struct>
>> >>
>> >> <struct name="XMI.header">
>> >> </struct>
>> >>
>> >> <struct name="XMI.content">
>> >> <element name="Model" ref="Model"/>
>> >> </struct>
>> >>
>> >> <struct name="Model">
>> >> <attribute name="xmi.id" minOccurs="1"
>> >> aspect="id" ref="xsd:string"/>
>> >> </struct>
>> >>
>> >> </xmlToSmalltalkBinding>
>> >> </schemaBindings>
>> >>
>> >> _______________________________________________
>> >> vwnc mailing list
>> >> [hidden email]
>> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>> >>
>>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

[vwnc] [VW7.6] SOAP fault 400

Simon Peter-2
In reply to this post by Kogan, Tamara
Hi,

(sorry for a repost, but i doubt the contents of the first mail were not
fully transfred)

I have a webservice client which recieves

<SOAP-ENV:faultcode>400</SOAP-ENV:faultcode>      (as found in the Exception
parameter of an HttpBadRequestError)

In my knowledge 400 can be of two reasons
1) error in the message
2) Problem with the server   (or rarely a combination of both)

In my Analysis.

1) The same webservice call works with a different <Body> part (so i assume
that my SOAP Envelope and the communication process is fine.
2) I got a confirmation from the webservice technical support that the
<Body> part of my xml is fine and they could complete the service call with
the <Body> that i sent to them.

My doubt,

1) is the SOAP fault something generated in VW after recieving the response
from the web?
If yes,
2)Is it possible to get the contents of the EncodedStream (obviously in a
readable format,in debug mode) to know what actual message recieved from
webservice and parsing of which/what gives me the actual exception ?


I think i have well explained the situtaion.Pardon my ignorance incase the
doubt arises only due to my inexperience.

Thanks in advance,

Simon

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Kogan, Tamara
Hello Simon,

If you put a breakpoint in WebServices.XMLObjectMarshalingManager class>>readDocumentFrom: and inspect httpEntity contents you will see the web services response as it was received by the Http client.

HTH,
Tamara Kogan
Smalltalk development,
Cincom Systems
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Simon Peter
> Sent: Tuesday, October 13, 2009 10:00 AM
> To: vwnc
> Subject: [vwnc] [VW7.6] SOAP fault 400
>
> Hi,
>
> (sorry for a repost, but i doubt the contents of the first
> mail were not
> fully transfred)
>
> I have a webservice client which recieves
>
> <SOAP-ENV:faultcode>400</SOAP-ENV:faultcode>      (as found
> in the Exception
> parameter of an HttpBadRequestError)
>
> In my knowledge 400 can be of two reasons
> 1) error in the message
> 2) Problem with the server   (or rarely a combination of both)
>
> In my Analysis.
>
> 1) The same webservice call works with a different <Body>
> part (so i assume
> that my SOAP Envelope and the communication process is fine.
> 2) I got a confirmation from the webservice technical support
> that the
> <Body> part of my xml is fine and they could complete the
> service call with
> the <Body> that i sent to them.
>
> My doubt,
>
> 1) is the SOAP fault something generated in VW after
> recieving the response
> from the web?
> If yes,
> 2)Is it possible to get the contents of the EncodedStream
> (obviously in a
> readable format,in debug mode) to know what actual message
> recieved from
> webservice and parsing of which/what gives me the actual exception ?
>
>
> I think i have well explained the situtaion.Pardon my
> ignorance incase the
> doubt arises only due to my inexperience.
>
> Thanks in advance,
>
> Simon
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Simon Peter-2
Thanks,
Sorry, but I am not using Object Marshalers for this.
I get the SOAP formatted Xml String from inside of a system and I just send
it through secured HTTP.
I need to return the response (SOAP formatted XML) as a String itself.

I know it is an old way to deal with SOAP messsaging, but we cannot change
the 'system' atleast for some time.

Do you think it is still possible?

regards,

Simon




----- Original Message -----
From: "Kogan, Tamara" <[hidden email]>
To: "Simon Peter" <[hidden email]>; "vwnc"
<[hidden email]>
Sent: Tuesday, October 13, 2009 8:38 PM
Subject: Re: [vwnc] [VW7.6] SOAP fault 400


> Hello Simon,
>
> If you put a breakpoint in WebServices.XMLObjectMarshalingManager
> class>>readDocumentFrom: and inspect httpEntity contents you will see the
> web services response as it was received by the Http client.
>
> HTH,
> Tamara Kogan
> Smalltalk development,
> Cincom Systems
>
>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of Simon Peter
>> Sent: Tuesday, October 13, 2009 10:00 AM
>> To: vwnc
>> Subject: [vwnc] [VW7.6] SOAP fault 400
>>
>> Hi,
>>
>> (sorry for a repost, but i doubt the contents of the first
>> mail were not
>> fully transfred)
>>
>> I have a webservice client which recieves
>>
>> <SOAP-ENV:faultcode>400</SOAP-ENV:faultcode>      (as found
>> in the Exception
>> parameter of an HttpBadRequestError)
>>
>> In my knowledge 400 can be of two reasons
>> 1) error in the message
>> 2) Problem with the server   (or rarely a combination of both)
>>
>> In my Analysis.
>>
>> 1) The same webservice call works with a different <Body>
>> part (so i assume
>> that my SOAP Envelope and the communication process is fine.
>> 2) I got a confirmation from the webservice technical support
>> that the
>> <Body> part of my xml is fine and they could complete the
>> service call with
>> the <Body> that i sent to them.
>>
>> My doubt,
>>
>> 1) is the SOAP fault something generated in VW after
>> recieving the response
>> from the web?
>> If yes,
>> 2)Is it possible to get the contents of the EncodedStream
>> (obviously in a
>> readable format,in debug mode) to know what actual message
>> recieved from
>> webservice and parsing of which/what gives me the actual exception ?
>>
>>
>> I think i have well explained the situtaion.Pardon my
>> ignorance incase the
>> doubt arises only due to my inexperience.
>>
>> Thanks in advance,
>>
>> Simon
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Kogan, Tamara
I think you still get the web services response as an instance of HttpResponse.  
anHttpResponse contents  - should retun you the message body as a decoded string.

Tamara Kogan
Smalltalk development,
Cincom Systems
 

> -----Original Message-----
> From: Simon Peter [mailto:[hidden email]]
> Sent: Tuesday, October 13, 2009 12:09 PM
> To: Kogan, Tamara; vwnc
> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
>
> Thanks,
> Sorry, but I am not using Object Marshalers for this.
> I get the SOAP formatted Xml String from inside of a system
> and I just send
> it through secured HTTP.
> I need to return the response (SOAP formatted XML) as a String itself.
>
> I know it is an old way to deal with SOAP messsaging, but we
> cannot change
> the 'system' atleast for some time.
>
> Do you think it is still possible?
>
> regards,
>
> Simon
>
>
>
>
> ----- Original Message -----
> From: "Kogan, Tamara" <[hidden email]>
> To: "Simon Peter" <[hidden email]>; "vwnc"
> <[hidden email]>
> Sent: Tuesday, October 13, 2009 8:38 PM
> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
>
>
> > Hello Simon,
> >
> > If you put a breakpoint in WebServices.XMLObjectMarshalingManager
> > class>>readDocumentFrom: and inspect httpEntity contents
> you will see the
> > web services response as it was received by the Http client.
> >
> > HTH,
> > Tamara Kogan
> > Smalltalk development,
> > Cincom Systems
> >
> >
> >> -----Original Message-----
> >> From: [hidden email]
> >> [mailto:[hidden email]] On Behalf Of Simon Peter
> >> Sent: Tuesday, October 13, 2009 10:00 AM
> >> To: vwnc
> >> Subject: [vwnc] [VW7.6] SOAP fault 400
> >>
> >> Hi,
> >>
> >> (sorry for a repost, but i doubt the contents of the first
> >> mail were not
> >> fully transfred)
> >>
> >> I have a webservice client which recieves
> >>
> >> <SOAP-ENV:faultcode>400</SOAP-ENV:faultcode>      (as found
> >> in the Exception
> >> parameter of an HttpBadRequestError)
> >>
> >> In my knowledge 400 can be of two reasons
> >> 1) error in the message
> >> 2) Problem with the server   (or rarely a combination of both)
> >>
> >> In my Analysis.
> >>
> >> 1) The same webservice call works with a different <Body>
> >> part (so i assume
> >> that my SOAP Envelope and the communication process is fine.
> >> 2) I got a confirmation from the webservice technical support
> >> that the
> >> <Body> part of my xml is fine and they could complete the
> >> service call with
> >> the <Body> that i sent to them.
> >>
> >> My doubt,
> >>
> >> 1) is the SOAP fault something generated in VW after
> >> recieving the response
> >> from the web?
> >> If yes,
> >> 2)Is it possible to get the contents of the EncodedStream
> >> (obviously in a
> >> readable format,in debug mode) to know what actual message
> >> recieved from
> >> webservice and parsing of which/what gives me the actual
> exception ?
> >>
> >>
> >> I think i have well explained the situtaion.Pardon my
> >> ignorance incase the
> >> doubt arises only due to my inexperience.
> >>
> >> Thanks in advance,
> >>
> >> Simon
> >>
> >> _______________________________________________
> >> vwnc mailing list
> >> [hidden email]
> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >>
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc 
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Simon Peter-2
Hi,

At present, i get anHttpBadRequest as the response (and the parameter
contents specifies a SoapFault 400) and i tried to debug to find the actual
position whene VW raises such exception. If ound that this happens in the
MimeParser after reading the message line to have 400 as the error code.
I expected to debug in to the Encoded responseStream to know what exactly
the web service responds with other than the message line. But from your
reply it seems that there is no point in getting that .

I will update as soon as i have other queries or some result.

Thanks for the help.

Simon


----- Original Message -----
From: "Kogan, Tamara" <[hidden email]>
To: "Simon Peter" <[hidden email]>; "vwnc"
<[hidden email]>
Sent: Wednesday, October 14, 2009 6:54 AM
Subject: Re: [vwnc] [VW7.6] SOAP fault 400


>I think you still get the web services response as an instance of
>HttpResponse.
> anHttpResponse contents  - should retun you the message body as a decoded
> string.
>
> Tamara Kogan
> Smalltalk development,
> Cincom Systems
>
>
>> -----Original Message-----
>> From: Simon Peter [mailto:[hidden email]]
>> Sent: Tuesday, October 13, 2009 12:09 PM
>> To: Kogan, Tamara; vwnc
>> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
>>
>> Thanks,
>> Sorry, but I am not using Object Marshalers for this.
>> I get the SOAP formatted Xml String from inside of a system
>> and I just send
>> it through secured HTTP.
>> I need to return the response (SOAP formatted XML) as a String itself.
>>
>> I know it is an old way to deal with SOAP messsaging, but we
>> cannot change
>> the 'system' atleast for some time.
>>
>> Do you think it is still possible?
>>
>> regards,
>>
>> Simon
>>
>>
>>
>>
>> ----- Original Message -----
>> From: "Kogan, Tamara" <[hidden email]>
>> To: "Simon Peter" <[hidden email]>; "vwnc"
>> <[hidden email]>
>> Sent: Tuesday, October 13, 2009 8:38 PM
>> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
>>
>>
>> > Hello Simon,
>> >
>> > If you put a breakpoint in WebServices.XMLObjectMarshalingManager
>> > class>>readDocumentFrom: and inspect httpEntity contents
>> you will see the
>> > web services response as it was received by the Http client.
>> >
>> > HTH,
>> > Tamara Kogan
>> > Smalltalk development,
>> > Cincom Systems
>> >
>> >
>> >> -----Original Message-----
>> >> From: [hidden email]
>> >> [mailto:[hidden email]] On Behalf Of Simon Peter
>> >> Sent: Tuesday, October 13, 2009 10:00 AM
>> >> To: vwnc
>> >> Subject: [vwnc] [VW7.6] SOAP fault 400
>> >>
>> >> Hi,
>> >>
>> >> (sorry for a repost, but i doubt the contents of the first
>> >> mail were not
>> >> fully transfred)
>> >>
>> >> I have a webservice client which recieves
>> >>
>> >> <SOAP-ENV:faultcode>400</SOAP-ENV:faultcode>      (as found
>> >> in the Exception
>> >> parameter of an HttpBadRequestError)
>> >>
>> >> In my knowledge 400 can be of two reasons
>> >> 1) error in the message
>> >> 2) Problem with the server   (or rarely a combination of both)
>> >>
>> >> In my Analysis.
>> >>
>> >> 1) The same webservice call works with a different <Body>
>> >> part (so i assume
>> >> that my SOAP Envelope and the communication process is fine.
>> >> 2) I got a confirmation from the webservice technical support
>> >> that the
>> >> <Body> part of my xml is fine and they could complete the
>> >> service call with
>> >> the <Body> that i sent to them.
>> >>
>> >> My doubt,
>> >>
>> >> 1) is the SOAP fault something generated in VW after
>> >> recieving the response
>> >> from the web?
>> >> If yes,
>> >> 2)Is it possible to get the contents of the EncodedStream
>> >> (obviously in a
>> >> readable format,in debug mode) to know what actual message
>> >> recieved from
>> >> webservice and parsing of which/what gives me the actual
>> exception ?
>> >>
>> >>
>> >> I think i have well explained the situtaion.Pardon my
>> >> ignorance incase the
>> >> doubt arises only due to my inexperience.
>> >>
>> >> Thanks in advance,
>> >>
>> >> Simon
>> >>
>> >> _______________________________________________
>> >> vwnc mailing list
>> >> [hidden email]
>> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>> >>
>> >
>> > _______________________________________________
>> > vwnc mailing list
>> > [hidden email]
>> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Kogan, Tamara
If you look at HttpException class>>handleResponse: this is the place the regular Http response is signaled as an exception. You can check an encoded stream underlaying stream contents. If it is binary use #asString to convert the stream collection in a readable string.

Tamara Kogan
Smalltalk development,
Cincom Systems
 

> -----Original Message-----
> From: Simon Peter [mailto:[hidden email]]
> Sent: Wednesday, October 14, 2009 8:44 AM
> To: Kogan, Tamara; vwnc
> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
>
> Hi,
>
> At present, i get anHttpBadRequest as the response (and the parameter
> contents specifies a SoapFault 400) and i tried to debug to
> find the actual
> position whene VW raises such exception. If ound that this
> happens in the
> MimeParser after reading the message line to have 400 as the
> error code.
> I expected to debug in to the Encoded responseStream to know
> what exactly
> the web service responds with other than the message line.
> But from your
> reply it seems that there is no point in getting that .
>
> I will update as soon as i have other queries or some result.
>
> Thanks for the help.
>
> Simon
>
>
> ----- Original Message -----
> From: "Kogan, Tamara" <[hidden email]>
> To: "Simon Peter" <[hidden email]>; "vwnc"
> <[hidden email]>
> Sent: Wednesday, October 14, 2009 6:54 AM
> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
>
>
> >I think you still get the web services response as an instance of
> >HttpResponse.
> > anHttpResponse contents  - should retun you the message
> body as a decoded
> > string.
> >
> > Tamara Kogan
> > Smalltalk development,
> > Cincom Systems
> >
> >
> >> -----Original Message-----
> >> From: Simon Peter [mailto:[hidden email]]
> >> Sent: Tuesday, October 13, 2009 12:09 PM
> >> To: Kogan, Tamara; vwnc
> >> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
> >>
> >> Thanks,
> >> Sorry, but I am not using Object Marshalers for this.
> >> I get the SOAP formatted Xml String from inside of a system
> >> and I just send
> >> it through secured HTTP.
> >> I need to return the response (SOAP formatted XML) as a
> String itself.
> >>
> >> I know it is an old way to deal with SOAP messsaging, but we
> >> cannot change
> >> the 'system' atleast for some time.
> >>
> >> Do you think it is still possible?
> >>
> >> regards,
> >>
> >> Simon
> >>
> >>
> >>
> >>
> >> ----- Original Message -----
> >> From: "Kogan, Tamara" <[hidden email]>
> >> To: "Simon Peter" <[hidden email]>; "vwnc"
> >> <[hidden email]>
> >> Sent: Tuesday, October 13, 2009 8:38 PM
> >> Subject: Re: [vwnc] [VW7.6] SOAP fault 400
> >>
> >>
> >> > Hello Simon,
> >> >
> >> > If you put a breakpoint in WebServices.XMLObjectMarshalingManager
> >> > class>>readDocumentFrom: and inspect httpEntity contents
> >> you will see the
> >> > web services response as it was received by the Http client.
> >> >
> >> > HTH,
> >> > Tamara Kogan
> >> > Smalltalk development,
> >> > Cincom Systems
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: [hidden email]
> >> >> [mailto:[hidden email]] On Behalf Of Simon Peter
> >> >> Sent: Tuesday, October 13, 2009 10:00 AM
> >> >> To: vwnc
> >> >> Subject: [vwnc] [VW7.6] SOAP fault 400
> >> >>
> >> >> Hi,
> >> >>
> >> >> (sorry for a repost, but i doubt the contents of the first
> >> >> mail were not
> >> >> fully transfred)
> >> >>
> >> >> I have a webservice client which recieves
> >> >>
> >> >> <SOAP-ENV:faultcode>400</SOAP-ENV:faultcode>      (as found
> >> >> in the Exception
> >> >> parameter of an HttpBadRequestError)
> >> >>
> >> >> In my knowledge 400 can be of two reasons
> >> >> 1) error in the message
> >> >> 2) Problem with the server   (or rarely a combination of both)
> >> >>
> >> >> In my Analysis.
> >> >>
> >> >> 1) The same webservice call works with a different <Body>
> >> >> part (so i assume
> >> >> that my SOAP Envelope and the communication process is fine.
> >> >> 2) I got a confirmation from the webservice technical support
> >> >> that the
> >> >> <Body> part of my xml is fine and they could complete the
> >> >> service call with
> >> >> the <Body> that i sent to them.
> >> >>
> >> >> My doubt,
> >> >>
> >> >> 1) is the SOAP fault something generated in VW after
> >> >> recieving the response
> >> >> from the web?
> >> >> If yes,
> >> >> 2)Is it possible to get the contents of the EncodedStream
> >> >> (obviously in a
> >> >> readable format,in debug mode) to know what actual message
> >> >> recieved from
> >> >> webservice and parsing of which/what gives me the actual
> >> exception ?
> >> >>
> >> >>
> >> >> I think i have well explained the situtaion.Pardon my
> >> >> ignorance incase the
> >> >> doubt arises only due to my inexperience.
> >> >>
> >> >> Thanks in advance,
> >> >>
> >> >> Simon
> >> >>
> >> >> _______________________________________________
> >> >> vwnc mailing list
> >> >> [hidden email]
> >> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >> >>
> >> >
> >> > _______________________________________________
> >> > vwnc mailing list
> >> > [hidden email]
> >> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >>
> >>
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc 
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Simon Peter-2
Hi,
The HttpBadRequestError is raised when the MimeParser finds that the
response line contains the code 400 .
The ioStream is made text (self binary: false) before the MimeParser uses
it, but tried to make the object under inspection a binary stream and
#asString returns a string which is only partially readable(contains a lot
of special characters).
So needless to say my debugging attempts are not fruitful yet.

Additionally I wish to add some more data.

1) I am not sure if i missed conveying a lot of information by not
specifying that the messaging uses a secure channel (to simplify, i am using
https and not http).
2) The same request works with VAST and VW 7.4.1 without any problem.

 Now i am trying to compare the class library usage for messaging in 7.4.1
and 7.6. Although the class libraies seems differnet at first look my first
instinct is to believe that the request stream that I flush in 7.4.1 and 7.6
are different and what i get from the webservice is a reflection of the
difference.

Do you have any suggestion regarding how to proceed with debug? I mean some
specific objects that i need to observ keenly ?

Regards,

Simon

NB:I Assume that this problem is unique and at present we don't have a patch
available.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

thomas.hawker
Simon,

FWIW, I noticed a bit of refactoring and renaming between VW7.4.1 and VW7.6.  I'm not sure what all was involved, but my own overrides and extensions to the net client interface had to be reworked.  It was more trouble to figure out what I needed to change than to make it work.

I'm afraid from your descriptions I can't offer any practical advice better than what Tamara has already given you.  You might want to breakpoint even lower in the process, such as right where the reply is received.

Cheers!
 
Tom Hawker
--------------------------
Senior Framework Developer
--------------------------
Home +1 (408) 274-4128
Office +1 (408) 576-6591
Mobile +1 (408) 835-3643
 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Simon Peter
Sent: Thursday, October 15, 2009 7:15 AM
To: Kogan, Tamara; vwnc
Subject: Re: [vwnc] [VW7.6] SOAP fault 400

Hi,
The HttpBadRequestError is raised when the MimeParser finds that the
response line contains the code 400 .
The ioStream is made text (self binary: false) before the MimeParser uses
it, but tried to make the object under inspection a binary stream and
#asString returns a string which is only partially readable(contains a lot
of special characters).
So needless to say my debugging attempts are not fruitful yet.

Additionally I wish to add some more data.

1) I am not sure if i missed conveying a lot of information by not
specifying that the messaging uses a secure channel (to simplify, i am using
https and not http).
2) The same request works with VAST and VW 7.4.1 without any problem.

 Now i am trying to compare the class library usage for messaging in 7.4.1
and 7.6. Although the class libraies seems differnet at first look my first
instinct is to believe that the request stream that I flush in 7.4.1 and 7.6
are different and what i get from the webservice is a reflection of the
difference.

Do you have any suggestion regarding how to proceed with debug? I mean some
specific objects that i need to observ keenly ?

Regards,

Simon

NB:I Assume that this problem is unique and at present we don't have a patch
available.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not
intended for you, please delete it immediately unread.  The internet
cannot guarantee that this communication is free of viruses, interception
or interference and anyone who communicates with us by email is taken
to accept the risks in doing so.  Without limitation, OOCL and its affiliates
accept no liability whatsoever and howsoever arising in connection with
the use of this email.  Under no circumstances shall this email constitute
a binding agreement to carry or for provision of carriage services by OOCL,
which is subject to the availability of carrier's equipment and vessels and
the terms and conditions of OOCL's standard bill of lading which is also
available at http://www.oocl.com.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Kogan, Tamara
In reply to this post by Simon Peter-2
Simon,


> The HttpBadRequestError is raised when the MimeParser finds that the
> response line contains the code 400 .

In 7.6 HttpParser doesn't raise any exceptions based on Http response code. There are two errors that are raised based on the request line:
HttpEntityError new messageText: 'Unexpected HTTP version (<1s>)..
And if the line is empty:
HttpEntityError new messageText: 'Wrong response status line:

If there is no problem with the status line the Http message will be parsed and then raised as an exception. The raised exceptions should have the http response as a parameter.
"exception parameter contents" should return the message contents as a string as the server sent it.

I am getting confused about the code you are talking about.

Tamara

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.6] SOAP fault 400

Simon Peter-2
Hi,

Thanks for all the suggestions, at presnt i have a solution for the problem
(possibly a temporary one).

I found that the difference between 7.4.1 and 7.6 (for me) happens to be the
chunking (dfault limit is 4096 and my request size 5088 and by default it
chunks).
I chose not to chunk and the requests give me correct response.
I also wish to do some tests to know other possible problems (if any) due to
the change.

thanks again,

Simon




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc