hi,

Check your request with the expected input element of the wsdl. it seems the
service expects an element called 'name'.

Try to access the service by generating the client using the wsdl2java tool.

Thanks,
Amila.

On Fri, Jul 4, 2008 at 1:05 PM, Alessandro Folli <[EMAIL PROTECTED]> wrote:

> Hi All.
>
> I'm writing a java class in order to invoke SharePoint webservices using
> Axis. I can successfully authenticate and get response from operations like
> GetUserCollectionFromWeb or GetGroupCollectionFromWeb defined in
> /_vti_bin/UserGroup.asmx.
>
> When I try to contact the operation GetGroupInfo I receive this error:
>
> Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was
> thrown.
>
> <axis2ns1:errorstring xmlns:axis2ns1="_
> http://schemas.microsoft.com/sharepoint/soap/_";> The parameter name cannot
> be empty or bigger than 255 characters.</axis2ns1:errorstring>
>
> The soap message I'm sending to the webservice is:
>
> <soap:Envelope xmln:soap="_http://schemas.xmlsoap.org/soap/envelope/_";
> xmlns:xsd="_http://www.w3.org/2001/XMLSchema_"; xmlns:xsi="_
> http://www.w3.org/2001/XMLSchema-instance_";>
>  <soap:Body>
>   <GetGroupInfo xmlns="_
> http://schemas.microsoft.com/sharepoint/soap/directory/_";>
>     <groupName>HelpGroup</groupName>
>   </GetGroupInfo>
>  </soap:Body>
> </soap:Envelope>
>
> Here the code:
>
>       try{
>
>             // Create the request message
>             OMFactory factory = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = factory.createOMNamespace("
> http://schemas.xmlsoap.org/soap/envelope/";, "soap");
>             OMNamespace xsiNs = factory.createOMNamespace("
> http://www.w3.org/2001/XMLSchema-instance";, "xsi");
>             OMNamespace xsdNs = factory.createOMNamespace("
> http://www.w3.org/2001/XMLSchema";, "xsd");
>                         OMElement env = factory.createOMElement("Envelope",
> omNs);
>             env.declareNamespace(xsiNs);
>             env.declareNamespace(xsdNs);
>
>             OMElement body = factory.createOMElement("Body", omNs);
>
>             // Create method
>             OMAttribute methodXmlns = factory.createOMAttribute("xmlns",
> null, "http://schemas.microsoft.com/sharepoint/soap/directory/";);
>             OMElement method = factory.createOMElement("GetGroupInfo",
> null);
>             method.addAttribute(methodXmlns);
>                         OMElement elementGroupName =
> factory.createOMElement("groupName", null);
>             elementGroupName.setText(groupName);
>             method.addChild(elementGroupName);
>
>             // Add method to body
>             body.addChild(method);
>                         // Add body to envelop
>             env.addChild(body);
>                                     // DEBUG
>             System.out.println(env.toString());
>                                     // Send the request
>             ServiceClient client = new ServiceClient();
>             // Create option object
>             Options options = new Options();
>             // Setting target EPR
>             options.setTo(new EndpointReference(this.EndpointURL));
>             options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>             //options.setUseSeparateListener(true);
>
>             // Setting action ,and which can be found from the wsdl of the
> service
>             options.setAction("
> http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo";);
>                       // Setting Timeout
>             options.setTimeOutInMilliSeconds(2000);
>                         HttpTransportProperties.Authenticator
>                     auth = new HttpTransportProperties.Authenticator();
>                     auth.setUsername(this.wsUser);
>                     auth.setPassword(this.wsPassword);
>                     auth.setDomain(this.wsDomain);
>                     auth.setHost(this.wsHost);
>                     //auth.setPort(this.wsPort);
>                     auth.setAllowedRetry(true);
>                     ;
>
>             options.setProperty(HTTPConstants.AUTHENTICATE,auth);
>
>                         // Setting created options into service client
>             client.setOptions(options);
>                                     OMElement res =
> client.sendReceive(env);
>             System.out.println(res);
>
>       }catch (AxisFault axisFault) {
>
>                 axisFault.printStackTrace();
>                 //System.out.println(axisFault.getReason());
>                 System.out.println(axisFault.getDetail().toString());
>
>      }
>
>
> What could be wrong? Any help would be appreciated.
>
> Thanks,
>
>  Alessandro
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to