5 Replies Latest reply on Feb 17, 2014 5:39 AM by Mauro Araujo

    Is it possible that XML is too big to Java transform ?

    Mauro Araujo Newbie


      i have a problem trasnforming my output it is malformated and i dont understand why it behaves like this



      Im ussing a Java Trasnformer

      The reult of the service is a String


      executing my webservice directly throught SoapUi directly i have this result :

      (XML String)

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


            <ns1:equipmentSearchResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://www.smartering.org/smartd/EquipmentConfigurationServices">

               <equipmentSearchReturn xsi:type="xsd:string"><![CDATA[<response><info><EquipmentListList id='25707739'><EquipmentList><createUsrId></createUsrId><createDtHor>20120312144232</createDtHor><equipmentId>qweqwq</equipmentId><companyId>EDI</companyId><equipmentTypeId>ss</equipmentTypeId><equipmentType>meterId</equipmentType><mark>xxx</mark><model>AAA</model><serialNumber>XXXX</serialNumber><cil></cil><cliName></cliName><state>C</state><reference>qwewe</reference><commReference></commReference><dtState>XXXX</dtState><configCreateUsr>GAT</configCreateUsr><configDtHor>20120312144232</configDtHor><configState>D</configState><connectionCode></connectionCode><connectionPointId>0</connectionPointId><ddCode></ddCode><ddDescription></ddDescription><ccCode></ccCode><ccDescription></ccDescription><fffCode></fffCode><fffDescription></fffDescription><lllCode></lllCode><lllDescription></lllDescription><streetId>0</streetId><streetIdDescription></streetIdDescription><beginDate>19700101000000</beginDate><endDate>99991231235900</endDate><version>0</version><custom1></custom1><custom2></custom2><custom3></custom3><commState>2</commState><commStateDesc></commStateDesc><dateCommState>20120323154524</dateCommState><swVersion></swVersion><lanState>I</lanState><lanDtState>XVVXVXVVXV</lanDtState><listEntityAttr></listEntityAttr><listCustomEntityAttr></listCustomEntityAttr><registerAction></registerAction></EquipmentList></EquipmentListList></info><status><code>0</code><message></message><title>null</title><icon>null</icon><button>null</button></status></response>]]></equipmentSearchReturn>






      im calling webservice  that returns the same result it comes as XML




                     <EquipmentListList id="22948120">
























      Even if a i Add CDATA  after  the tag  <searchEquipmentSoaResponse> the reult will be  the same

      I lost Information. Should i  use other type of Trasnformers like JAXB or Smooks?

        • 1. Re: Is it possible that XML is too big to Java transform ?
          Keith Babo Master

          If you have a Java-based transformer, you should be able to test it independently from SY.  If it works outside of SY, but fails in SY, please attach an archive which includes the transform, test content, and unit test of the transformer.

          • 2. Re: Re: Is it possible that XML is too big to Java transform ?
            Mauro Araujo Newbie


            i tried to do a trasnformation test but not sure if the test is well written i dont understand the result (my gide line here was the quickstart-bean-service tests )

            it fails:  org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean  - Could not find endpoint named {http://endpoint.soap.component.switchyard.org/}BaseWebServicePort.  Possible values are [{urn:com.example.switchyard:BpmEqSearch:1.0}ServiceInputPort].

            i apreciate if u can give me some hints about it.


            i Did a webService test and it seams to be working because it gave the same error i said.

            I include the SoapFiles and xml.

            i put the results test in attchment.


            Thanks for your help.

            • 3. Re: Is it possible that XML is too big to Java transform ?
              Keith Babo Master

              Just to clarify what I'm asking for here - your original question had to do with transformation not working as expected using a Java transformer.  If you have a Java transformer, you can test it completely independent of SwitchYard to make sure it produces the expected output.  Just create an instance of the class in a standalone junit test, invoke the transform method, and assert against the result.  If that passes outside of SwitchYard, then there's a config issue with the SY app.  If it doesn't pass outside of SY, then that indicates it's an issue with your transformer implementation.

              • 4. Re: Is it possible that XML is too big to Java transform ?
                Mauro Araujo Newbie

                I understand clearly,

                and sorry

                And i know it's going a bit Off topic.


                I was debugging at trasnformers and i notice something strange.

                the thing is that  i tested my trafic with a sniffer

                and i dont understand why I recive half of information that my server sends?


                1) what proprety i need to configure in my server(client) to change the size of payload recived?

                2) it  will be related some how to assynchronous service?

                3) do i need to add messages Composers to soap and why? and where i can get a nice example if possible?

                4) is this a Java problem my other isntance is Jboss  7.1  and  this is Jbos 6.1 Eap  / (apache services  related or something ?)

                5) String may be insuficient to acomodate/ recive the result ?

                6) My service has Transfer-Encoding :chunked and (uses Apache Axis 1.4)  and in SY i dont know how to enable this propertie it assumes as content lenght,it behaves like the connection is over.

                7) Added some Iterceptor to my SoapBinding  got this Message from Apache camel when i  inpect my Exchange [Body clipped after 500 chars, total length is 3253]] it is apears to be the same size of  the final message.


                Added Full Message Trace


                sorry for be off topic


                Im really stuck.

                thanks for your help.

                • 5. Re: Is it possible that XML is too big to Java transform ?
                  Mauro Araujo Newbie

                  Finaly I understand what is goin on  , the problem was before the message reach the trasnformer aprently this tag  <?xml version="1.0" encoding="UTF-8"?>

                  this  messed up the transport  and was the cause of the problem

                  so i put an interceptor and remove it, and finlay i setted the out put without the tag  and it all work as it should