Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 886419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:03:53+00:00 2026-05-15T13:03:53+00:00

I am having a rather frustrating issue trying to call a web service that

  • 0

I am having a rather frustrating issue trying to call a web service that requires an attachment.

This is the error:

Unexpected Attachment type =class
java.lang.Object

from here:

class=”com.sun.xml.ws.client.sei.ResponseBuilder$AttachmentBuilder”
file=”ResponseBuilder.java” line=”250″
method=”createAttachmentBuilder”

The method the web proxy gives me is this:

  public Reply putDocument(
    @WebParam(targetNamespace="uri:put.document", partName="request", name="request")
      StoreType request,
    @WebParam(targetNamespace="", partName="put", name="put")
      Object put);

What I cannot figure out is what to pass in for “put”, which is only defined as an Object.

I have tried:

byte[]
String
DataHandler(ByteArrayDataSource)
uri.put_document.ObjectFactory.createPut(byte[])
AttachmentPart

I have also tried looking for the code but haven’t had luck so far.

EDIT: WSDL is as follows.

<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="urn:fer"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="urn:fer"
             xmlns:get="uri:get.document"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
             xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
  <types>
      <xsd:schema>
        <xsd:import namespace="uri:get.document"
                    schemaLocation="../xsd/getDocument.xsd"/>
      </xsd:schema>
  </types>
  <message name="putDocument">
    <part name="request" element="put:request"/>    
    <part name="put" element="put:put"/>
  </message>
  <message name="putDocumentReply">
    <part name="reply" element="put:reply"/>    
  </message>
  <portType name="FrontEndRepository">
    <operation name="putDocument">
      <input message="tns:putDocument"/>
      <output message="tns:putDocumentReply"/>
    </operation>
  </portType>
  <binding name="frontEndRepositoryPortSOAP11Binding"
           type="tns:FrontEndRepository">
    <soap:binding style="document"
                  transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="putDocument">
      <soap:operation style="document"
                      soapAction="putDocument"/>
      <input>
        <mime:multipartRelated>
          <mime:part>
            <soap:body use="literal" parts="request"/>
          </mime:part>
          <mime:part>
            <mime:content part="put" type="binary"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="FrontEndRepository">
    <port name="FrontEndRepository"
          binding="tns:frontEndRepositoryPortSOAP11Binding">
      <soap:address location="http://localhost:7101/FER-FrontEndrepository-context-root/frontEndRepositoryPort"/>
    </port>
  </service>
</definitions>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:03:54+00:00Added an answer on May 15, 2026 at 1:03 pm

    I expect the type attribute in the mime:content element to contain a MIME type, eg. “application/octet-stream”, “application/pdf” or “text/plain” rather than “binary”.

    Using javax.activation.DataHandler should work, and I think you should be able to fix the MIME type of the attachment, and then use a DataHandler instance or a type appropriate to the MIME type (eg. java.awt.Image for “image/jpeg”).

    You say you have tried a DataHandler, but you haven’t provided the exception for that case. If that still fails, what happens when you try it?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having recently discovered this method of development, I'm finding it a rather nice methodology.
Having a heckuva time with this one, though I feel I'm missing something obvious.
Having read the threads Is SqlCommand.Dispose enough? and Closing and Disposing a WCF Service
Having programmed through emacs and vi for years and years at this point, I
Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the
Having been a PHP developer on LAMP servers for quite a while, is there
Having worked with Classic ASP for about 2 years now by creating a few
Having to upgrade a database schema makes installing a new release of software a
Having a problem getting a TreeView control to display node images. The code below
Having integrated merb_auth_password_slice as per the README, I can successfully login as redirect_after_login is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.