users@saaj.java.net

Re: Res: Res: Res: [SAAJ-USR] Problems with getSOAPBody from SAAJ

From: V B Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Thu, 27 Sep 2007 20:53:21 +0530

Luiz Ricardo wrote:

> Hi,
>
> thanks once again. The "Attachment Tip" that you sent to us worked OK,
> but the problem is that we have to follow a specification to develop
> the web service and this specification says that the web service waits
> for a SOAP message where the XML contents has to be transfered into
> the message body, that is, we have to develop the web service that
> follows a WSDL file and the clients won't send SOAP messages with
> attachments.
>
> Attached is the WSDL file that we have to follow. Anyway, thanks so much!

When i earlier suggested JAXWS i was not sure whether you guys had a
WSDL with schema definitions. Since you have that it is all the more a
good reason to use JAXWS instead of a SAAJ Servlet. It would give you a
big boost in performance as well (because JAXWS does not use DOM, SAAJ
uses DOM).

Thanks.

>
> Regards,
>
> Luiz Ricardo Belém Santos
> Sun Certified Programmer for the Java 2 Platform
>
>
> ----- Mensagem original ----
> De: V B Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
> Para: users_at_saaj.dev.java.net
> Enviadas: Quinta-feira, 27 de Setembro de 2007 9:53:16
> Assunto: Re: Res: Res: [SAAJ-USR] Problems with getSOAPBody from SAAJ
>
> Luiz Ricardo wrote:
>
>> Hi,
>>
>> thanks once again. We analyzed your considerations, but unfortunately
>> we can´t use Text Attachment, as you recommended, because we really
>> need the contents to be treated as XML for this is a project
>> requirement that we can´t change.
>
> Even if the content needs to be XML you can always send it as Text
> Attachment and then try to build a DOM Document from the Attachment
> XML and then throw an error if the XML is not well formed. Once you
> think of this approach, you can also see that you can probably try and
> ZIP your Attachment on the client side (to reduce its size) and then
> unzip it before using on the server side.
>
> Thanks.
>
>>
>
> \
>
>
> Flickr agora em português. Você clica, todo mundo vê. Saiba mais
> <http://br.rd.yahoo.com/mail/taglines/flickr/*http://www.flickr.com.br/>.
>
>------------------------------------------------------------------------
>
><?xml version="1.0" encoding="utf-8"?>
><wsdl:definitions
> xmlns:tns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao"
> xmlns:s="http://www.w3.org/2001/XMLSchema"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> targetNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:types>
> <s:schema elementFormDefault="qualified"
> targetNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao">
> <s:element name="nfeRecepcaoLote">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1"
> name="nfeCabecMsg" type="s:string" />
> <s:element minOccurs="0" maxOccurs="1"
> name="nfeDadosMsg" type="s:string" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:element name="nfeRecepcaoLoteResponse">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1"
> name="nfeRecepcaoLoteResult" type="s:string" />
> </s:sequence>
> </s:complexType>
> </s:element>
> </s:schema>
> </wsdl:types>
> <wsdl:message name="nfeRecepcaoLoteSoapIn">
> <wsdl:part name="parameters" element="tns:nfeRecepcaoLote" />
> </wsdl:message>
> <wsdl:message name="nfeRecepcaoLoteSoapOut">
> <wsdl:part name="parameters"
> element="tns:nfeRecepcaoLoteResponse" />
> </wsdl:message>
> <wsdl:portType name="NfeRecepcaoSoap">
> <wsdl:operation name="nfeRecepcaoLote">
> <wsdl:input message="tns:nfeRecepcaoLoteSoapIn" />
> <wsdl:output message="tns:nfeRecepcaoLoteSoapOut" />
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="NfeRecepcaoSoap12" type="tns:NfeRecepcaoSoap">
> <soap12:binding
> transport="http://schemas.xmlsoap.org/soap/http" />
> <wsdl:operation name="nfeRecepcaoLote">
> <soap12:operation
> soapAction="http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao/nfeRecepcaoLote"
> style="document" />
> <wsdl:input>
> <soap12:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap12:body use="literal" />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="NfeRecepcao">
> <wsdl:port name="NfeRecepcaoSoap12"
> binding="tns:NfeRecepcaoSoap12">
> <soap12:address
> location="http://localhost:8080/nfe/NfeRecepcao" />
> </wsdl:port>
> </wsdl:service>
></wsdl:definitions>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_saaj.dev.java.net
>For additional commands, e-mail: users-help_at_saaj.dev.java.net
>
>