0 Replies Latest reply on Oct 3, 2017 11:23 AM by angelbaranda

    cxf base64Binary

    angelbaranda

      Hello, everyone.

      I want to use a call to a WSDL from FUSE using CXF but I'm not sure how I can do it to add a Base64 parameter of attaching files

      From a simple call from a SOAPUI, I make the following request

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Header>
        <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsse:UsernameToken wsu:Id="UsernameToken-1">
        <wsse:Username>zzzzzzz</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">zzzzzzz</wsse:Password>
        </wsse:UsernameToken>
        </wsse:Security>
        <ns2:Configuration encoding="UTF-8" lang="es" xmlns:ns2="http://www.xxxxxxxxxx.net/xf/ws"/>
        </soap:Header>
        <soap:Body>
        <ns2:sendMessage xmlns:ns2="http://ws.email.messaging.mc.xxxxxx.net/">
        <arg0>
        <from>yyyyy@yyyyy.com</from>
        <messages>
        <readConfirmation>true</readConfirmation>
        <to>xxxx@xxxxx.com</to>
        <attachments>
        <!--Optional:-->
        <data>cid:12456677909989</data>
        <!--Optional:-->
        <name>manual</name>
        </attachments>
        </messages>
        <content>
        <txt>TEXT TEST</txt>
        </content>
      
        <readConfirmation>true</readConfirmation>
        <subject>TEST FROM SOAPUI</subject>
        </arg0>
        </ns2:sendMessage>
        </soap:Body>
      </soap:Envelope>
      

       

       

      With a correct response on the request

       

       

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Body>
        <ns2:sendMessageResponse xmlns:ns2="http://ws.email.messaging.mc.xxxxx.net/" xmlns:ns3="http://xxxxxx.net/xf/ws">
        <return>
        <code>100</code>
        <requestId>37995900-7e8d-40ec-82fa-51e0c213cf0f</requestId>
        <results>
        <messageId>bcaab1f5-9dba-4dcd-b17d-1b62eb986d8b</messageId>
        <status>500</status>
        </results>
        </return>
        </ns2:sendMessageResponse>
        </soap:Body>
      </soap:Envelope>
      

       

       

      The wdsl complexType definition:

      <xs:complexType name="attachment">
        <xs:sequence>
        <xs:element minOccurs="0" name="data" type="xs:base64Binary"></xs:element>
        <xs:element minOccurs="0" name="name" type="xs:string"></xs:element>
        </xs:sequence>
        </xs:complexType>
      

       

       

       

      I need to make a call from FUSE(CXF) to invoke the sendMessage method with the attachment/data parameter

      My initial blueprint.xml

       

      <cxf:cxfEndpoint
        address="http://xxxxxxxx/mc/services/emailService/sendMessage" id="sendMail"/>
      
      
       
      
        <camelContext id="edpc" trace="true" xmlns="http://camel.apache.org/schema/blueprint">
      
        <to id="_to6" uri="cxf:bean:sendMail"/>
      

       

       

      Is it possible to make a call from Fuse(CXF) to a WSDL with the Base64 parameter and, if so, how can this be achieved?

      The wdsl is on the same network as Fuse but in different IP

       

      Best regards.