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

  • Home
  • SEARCH
  • 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 4008056
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:42:25+00:00 2026-05-20T08:42:25+00:00

I’m trying to save a file to a Sharepoint server using JAX-WS. The web

  • 0

I’m trying to save a file to a Sharepoint server using JAX-WS. The web service call is reporting a success, but the file doesn’t show up.

I used this command (from a WinXP) to generate the Java code to make the JAX-WS call:

wsimport -keep -extension -Xnocompile http://hostname/sites/teamname/_vti_bin/Copy.asmx?WSDL

I get a handle on the web service which I called port using the following:
CopySoap port = null;

if (userName != null && password != null) {
    Copy service = new Copy();
    port = service.getCopySoap();
    ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, userName);
    ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
} else {
    throw new Exception("Holy Frijolé! Null userName and/or password!");
}

I called the web service using the following:

port.copyIntoItems(sourceUrl, destUrlCollection, fields ,
    "Contents of the file".getBytes(), 
    copyIntoItemsResult, copyResultCollection)

The sourceUrl and the only url in destUrlCollection equals “hostname/sites/teamname/Tech Docs/Sub Folder”.

The FieldInformationCollection object named fields contains only one FieldInformation.
The FieldInformation object has “HelloWorld.txt” as the value for displayName, internalName and value.
The type property is set to FieldType.FILE. The id property is set to (java.util.UUID.randomUUID()).toString().

The call to copyIntoItems returns successfuly; copyIntoItemsResult contains a value of 0 and the only CopyResult object
set in copyResultCollection has an error code of “SUCCESS” with a null error message.

When I look into the “Tech Docs” library on Sharepoint, in the “Sub Folder” there’s no file there.

Why wouldn’t it tell me what I did wrong? Did I just miss a step?

Update (Feb 26th, 2011)

I’ve changed my FieldInformation object’s displayName and internalName properties to be “Title” as suggested. Still no joy, but a step in the right direction.

After playing around with the urls for a bit, I got these results:

With both the sourceUrl and the only destination URL equivalent, with no protocol, I get the SUCCESS response but no actual document appears in the document library.

With both of the URLs equivalent but with an “http://” protocol specified, I get an UNKNOWN error with “Object reference not set to an instance of an object.” as the message.

With the source URL an empty string or null, I get an UNKNOWN error with ” Value does not fall within the expected range.” as the error message.

Update (March 2nd, 2011)

As suggested by Alexei Levenkov, I used Fiddler to see what was going on and found this:

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
34  401 HTTP    hostname    /sites/teamname/_vti_bin/Copy.asmx?WSDL 1,656       text/html   javaw:5304          
35  401 HTTP    hostname    /sites/teamname/_vti_bin/Copy.asmx?WSDL 1,539       text/html   javaw:5304          
36  200 HTTP    hostname    /sites/teamname/_vti_bin/Copy.asmx?WSDL 10,887  private     text/xml; charset=utf-8 javaw:5304          
37  401 HTTP    hostname    /sites/teamname/_vti_bin/Copy.asmx  1,656       text/html   javaw:5304          
38  401 HTTP    hostname    /sites/teamname/_vti_bin/Copy.asmx  1,539       text/html   javaw:5304          
39  200 HTTP    hostname    /sites/teamname/_vti_bin/Copy.asmx  611 private, max-age=0      text/xml; charset=utf-8 javaw:5304          

It looks like a simple handshake going on until it gets the HTTP 200 for both the WSDL and the web service call.

So I tried not putting my username and password in the RequestContext and I get a similar thing as I do above for the WSDL request (two HTTP 401s and one HTTP 200), but the WebService call only has one HTTP 200. If it no longer uses my username/password, then it should theoretically fail authentication.

  • 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-20T08:42:26+00:00Added an answer on May 20, 2026 at 8:42 am

    Destination Urls should contain full paths to files. I check out sample on method description page – http://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems.aspx.

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

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.