Adding an attachment to SOAP request

后端 未结 6 1892
旧巷少年郎
旧巷少年郎 2020-12-28 23:36

I am at a loose end as to how to add an attachment in my SOAP request. We have to consume a thrid party web service, built in java, which is the most convoluted thing I have

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 00:03

    I am involved in exactly the same project and I have the same issues as discussed in this thread! I am using vb 2005 and WSE 3.0 enhancements and I got it working even it is a pain for now. When writing the content of the file directly in the File Property, the attachment will be accepted by the partner. In my case, this works for almost all transactions except PRA's. Here, the response is positive and an AttachmentID will be delivered but the attachment does not appear in the transaction.

    Here is an example of the Attachment section:

                    
                      /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ...
                      intro2.jpg
                    
    

    If I set RequireMtom for the Service to True, I'll get the following error:

    Das Präfix '' kann nicht von '' in 'http://www.starstandards.org/webservices/2005/10/transport' innerhalb desselben Startelementtags neu definiert werden.

    One the one hand, it works, on the other hand, I am not sure if it will be sent with XOP elements.

提交回复
热议问题