Alessandro:
Did you ever figure out what was causing the error "detail unsupported
element in SOAPFault element"? We recently saw the same problem, also
with a Sharepoint server, and would be interested in anything you learned.
-Jake
Alessandro Folli wrote:
Hi,
I have generated the client using the wsdl2java tool. Unfortanately,
I'm having problems. The soap message generated by the tool corresponds
to the previous one:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns1:GetGroupInfo
xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/directory/">
<ns1:groupName>026e9ad0-52e0-4b89-91d8-c63898f8d38b</ns1:groupName>
</ns1:GetGroupInfo>
</soapenv:Body>
</soapenv:Envelope>
I'm not sure if I have used the Stub correctly. I couldn't find Request
method like in the example...
UserGroupStub ugStub = new
UserGroupStub("http://192.168.248.13:15492/_vti_bin/UserGroup.asmx");
UserGroupStub.GetGroupInfo request = new
UserGroupStub.GetGroupInfo();
org.apache.axis2.client.Options options =
ugStub._getServiceClient().getOptions();
HttpTransportProperties.Authenticator
auth = new HttpTransportProperties.Authenticator();
auth.setUsername("Administrator");
auth.setPassword("novell");
auth.setDomain("IDMTEST");
auth.setHost("192.168.248.13");
auth.setAllowedRetry(true);
;
options.setProperty(HTTPConstants.AUTHENTICATE,auth);
// Fill up the request object
request.setGroupName("026e9ad0-52e0-4b89-91d8-c63898f8d38b");
//send and get the response
UserGroupStub.GetGroupInfoResponse response =
ugStub.GetGroupInfo(request);
At the moment I'm getting this error:
org.apache.axiom.om.impl.exception.OMBuilderException: detail
unsupported element in SOAPFault element
at
org.apache.axiom.soap.impl.builder.SOAP12BuilderHelper.handleEvent(SOAP12BuilderHelper.java:175)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:374)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:212)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172)
at
org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:633)
at
org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:141)
at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:314)
at
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:118)
at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:252)
at
org.apache.axiom.soap.impl.llom.soap12.SOAP12FaultImpl.getReason(SOAP12FaultImpl.java:143)
at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:202)
at org.apache.axis2.AxisFault.<init>(AxisFault.java:196)
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
com.microsoft.schemas.sharepoint.soap.directory.UserGroupStub.GetGroupInfo(UserGroupStub.java:8382)
at SPTest.main(SPTest.java:51)
Any help would be appreciated,
Alessandro
Amila Suriarachchi wrote:
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]
<mailto:[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]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
Amila Suriarachchi,
WSO2 Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]