Menu

WSDLREpository

Help
2016-07-14
2016-07-25
  • Tester Toss

    Tester Toss - 2016-07-14

    Hi. sorry for my numerous posts. Ive switched from the 2012/11 nightly build to the 2015 one, and am wondering where did the WSDLRepository class go? Has it been removed?

     
  • Chris

    Chris - 2016-07-15

    It has been renamed. It's DescriptionRepository now.

     
  • Tester Toss

    Tester Toss - 2016-07-18

    Hi, Chris. Sorry to bother you again. I've another question, this time regarding AttachmentFactory.

    I have a print/scan web-service (which follows the Microsoft WSD:Print standard) that accepts print data in the form of base64binary(wrapped in xml). What i want to do is send PDL (page description language) data that consists of the file data wrapped within PJL command lines. So basically the data structure would be like this:

    12345X
    @PJL JOB NAME=jobname
    @PJL COMMENT DSSC PRINT RENDERMODE=GRAYSCALE
    ...
    ...
    
    //file data here
    
    12345X@PJL EOJ
    What i did was construct them separately:
    

    1) PJL command lines

    2) file byte[]

    then encode them using the Base64 class, encoding them to Base64 byte[] before concatenating them using ByteArrayOutputStream and converting them back to byte[]. I did take into account that the first bytearray can't contain '=' at the end and encoded the bytes accordingly. When i tried validating the byte[] using an online decoder, the data came out fine. However, the i got the datatype mismatch(IOException error).

    error log is somethins like this:

    InvokeMessage [ header=SOAPHeader, messageId=urn:uuid:3761aa50-4d87-11e6-bfb7-67fc38b469fe, relatesTo=null, replyTo=null, faultTo=null, from=null, to=http://172.20.28.254:50082/, appSequence=null, referenceParameters=null ], inbound=false, content=PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}SendDocumentRequest, children=(96, PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}DocumentDescription, children=(1, None, unknown), min=1, max=1 ], PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}DocumentData, min=1, max=1 ]), min=1, max=1 ] ]
    [DEBUG] Send DPWS 2006 Message
    [DEBUG] Chunk mode changed to 0 for address address=http://172.20.28.254:50082/, ProtocolInfo: DPWSProtocolVersion [dpwsVersion = DPWS 2006]
     [DEBUG] <O-TCP> From 172.20.28.200@36155 to 172.20.28.254@50082, TCP Connection [ id = 86 ]
    [DEBUG] <O> HTTP request [ method=POST, version=HTTP/1.1, URI=/ ] to 172.20.28.254@50082, TCP Connection [ id = 86 ]
    [DEBUG] <O> Communicate over :DPWS 2006, Action: Unknown Message, Id: urn:uuid:3761aa50-4d87-11e6-bfb7-67fc38b469fe
    [DEBUG] <I-TCP> Reading data, TCP Connection [ id = 86 ]
    [DEBUG] <O-TCP> Sending data, TCP Connection [ id = 86 ]
    DEBUG] <I> HTTP response [ status=400, reason=Bad Request ] from 172.20.28.200@36155, TCP Connection [ id = 86 ]
    [DEBUG] <I> Incoming DPWS 2006 Message, Action: Unknown Message, Id: urn:uuid:3761aa50-4d87-11e6-bfb7-67fc38b469fe
    [DEBUG] <I> Incoming SOAP message header: [ SOAPHeader, messageId=urn:uuid:3761aa50-4d87-11e6-bfb7-67fc38b469fe, relatesTo=null, replyTo=null, faultTo=null, from=null, to=http://172.20.28.254:50082/, appSequence=null, referenceParameters=null ] ]
    [DEBUG] <I> Message: FaultMessage [ header=SOAPHeader, messageId=urn:uuid:3761aa50-4d87-11e6-bfb7-67fc38b469fe, relatesTo=null, replyTo=null, faultTo=null, from=null, to=http://172.20.28.254:50082/, appSequence=null, referenceParameters=null ], inbound=true, code={http://www.w3.org/2003/05/soap-envelope}Sender, subcode=null, subsubcode=null, reason={en-US=Validation constraint violation: data type mismatch n3:base64Binary in element <n1:DocumentData>}, detail=null ]
    

    edit: the operation is SendDocumentRequest, i've attached the relevant xml files

     

    Last edit: Tester Toss 2016-07-19
  • Chris

    Chris - 2016-07-19

    It seems that the message you are sending is not complete. You forgot the LastDocument element. It's not optional:

    <xs:sequence>
        <xs:element name="JobId" type="wprt:JobIdType"/>
        <xs:element name="DocumentDescription" type="wprt:DocumentDescriptionType"/>
        <xs:element name="DocumentProcessing" type="wprt:DocumentProcessingType" minOccurs="0"/>
        <xs:element name="LastDocument" type="wprt:BoolExtType"/>
        <xs:element name="DocumentData" type="xs:base64Binary"/>
    </xs:sequence>
    
     
    • Tester Toss

      Tester Toss - 2016-07-20

      HI, Chris. i addded the LastDocument element, am now receiving this fault message:

      [DEBUG] <I> Message: FaultMessage [ header=SOAPHeader, messageId=urn:uuid:2674c520-4e17-11e6-80a0-9e12914b20b3, relatesTo=null, replyTo=null, faultTo=null, from=null, to=http://172.20.28.254:50082/, appSequence=null, referenceParameters=null ], inbound=true, code={http://www.w3.org/2003/05/soap-envelope}Sender, subcode=null, subsubcode=null, reason={en-US=Validation constraint violation: data type mismatch n1:BoolExtType in element <n1:LastDocument>}, detail=null ]
      

      Operation declaration:

      Operation sdo = s.getOperation(q, constantz.SD_NAME, constantz.SD_INPUTNAME, constantz.SD_OUTPUTNAME); //SendDocumentRequest
      
              ParameterValue sdop = sdo.createInputValue();
      
              ParameterValueManagement.setString(sdop, "JobId", JobId);
              ParameterValue dd = sdop.get("DocumentDescription");
              ParameterValueManagement.setString(dd, "DocumentId", "1");
              ParameterValueManagement.setString(dd, "Compression", "None");
              ParameterValueManagement.setString(dd, "Format", "unknown");
              ParameterValueManagement.setString(sdop, "LastDocument", "true");
      
              ParameterValueManagement.setAttachment(sdop, "DocumentData", af.createMemoryAttachment(dar, MIMEConstants.CONTENT_TYPE_APPLICATION_OCTET_STREAME_IMAGE_JPEG));
      

      invoked message:

      InvokeMessage [ header=SOAPHeader, messageId=urn:uuid:e0dd7410-4e18-11e6-8065-c9c35d39018c, relatesTo=null, replyTo=null, faultTo=null, from=null, to=http://172.20.28.254:50082/, appSequence=null, referenceParameters=null ], inbound=false, content=PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}SendDocumentRequest, children=(104, PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}DocumentDescription, children=(1, None, unknown), min=1, max=1 ], true, PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}DocumentData, min=1, max=1 ]), min=1, max=1 ] ]
      
       

      Last edit: Tester Toss 2016-07-20
      • Tester Toss

        Tester Toss - 2016-07-25

        Chris - how does one set values of boolean using ParameterValueManagement? Thanks in advance

         
  • Chris

    Chris - 2016-07-25

    Hi,
    can you please log the related network messages with wireshark and upload them?

     

Log in to post a comment.