You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Das, Amar" <am...@fmr.com> on 2007/11/05 16:19:15 UTC
Sharepoint Web services
Hi:
I generated Java code using wsdl2java for Microsoft sharepoint web
services http://server/_vti_bin/Webs.asmx. I am trying to execute the
GetWebCollection methods using the following code.
<code>
public class TestShare {
public static void main(String[] args) {
try {
WebsStub stub = new WebsStub();
// setup NTLM auth
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setDomain("x");
auth.setUsername("x");
auth.setPassword("x");
auth.setHost("x");
ArrayList<String> authSchemes = new
ArrayList<String>();
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes);
Options options = new Options();
options.setProperty(HTTPConstants.AUTHENTICATE,
auth);
ServiceClient serviceClient =
stub._getServiceClient();
serviceClient.setOptions(options);
// set NTLM auth
serviceClient.getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);
GetWebCollection wc = new
WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
} catch (Exception e) {
e.printStackTrace();
}
}
}
</code>
I am receiving the following error. What am I doing wrong?
org.apache.axis2.AxisFault: Address information does not exist in the
Endpoint Reference (EPR).The system cannot infer the transport
mechanism.
at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
ava:65)
at
org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
lient.java:302)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:174)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
)
at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Sharepoint Web services
Posted by "Das, Amar" <am...@fmr.com>.
Here is the revised code that generates the same error
WebsStub stub = new WebsStub();
ServiceClient serviceClient = stub._getServiceClient();
Options options = serviceClient.getOptions();
options.setTo(new
EndpointReference("http://server/_vti_bin/Webs.asmx"));
options.setUserName("domain\\Username");
options.setPassword("pass");
GetWebCollection wc = new WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
_____
From: Paul Fremantle [mailto:pzfreo@gmail.com]
Sent: Monday, November 05, 2007 11:32 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
Are you calling
stub._getServiceClient().getOptions().setUsername() and
setPassword()?
in your code
Paul
On 11/5/07, Das, Amar < amar.das@fmr.com
<ma...@fmr.com> > wrote:
That's what this portion of the code does or am I wrong?
options.setProperty(HTTPConstants.
AUTHENTICATE, auth);
ServiceClient serviceClient = stub._getServiceClient();
serviceClient.setOptions(options);
_____
From: Paul Fremantle [mailto:pzfreo@gmail.com]
Sent: Monday, November 05, 2007 11:07 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
This looks like you are now getting an error
from the server. I assume that the server is expecting a
username/password to be set.
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
I have checked and found the URL to be
valid.
I set the options instead and added the
following line
options.setTo(new EndpointReference(
http://server/_vti_bin/Webs.asmx <http://server/_vti_bin/Webs.asmx> ));
Now I am getting the following error
org.apache.axis2.AxisFault: Transport
error: 401 Error: Unauthorized
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(
HTTPSender.java:298)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(
HTTPSender.java:192)
at
org.apache.axis2.transport.http.HTTPSender.send(
HTTPSender.java:77)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(
CommonsHTTPTransportSender.java:327)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
CommonsHTTPTransportSender.java:206)
at
org.apache.axis2.engine.AxisEngine.send(
AxisEngine.java:396)
at
org.apache.axis2.description.OutInAxisOperationClient.send(
OutInAxisOperation.java:374)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
OutInAxisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(
OperationClient.java:163)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWebCollection(
WebsStub.java:1337)
at ftg.ops.eas.ps.TestShare.main(
TestShare.java:44)
_____
From: Paul Fremantle
[mailto:pzfreo@gmail.com]
Sent: Monday, November 05, 2007 10:37 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
When Axis2 creates a stub, it hard codes
the URL that is in the WSDL into the stub as the default, but you can
modify this at runtime. It seems like the URL contained in the WSDL for
the server is not valid so the "hard-coded" service URL won't work.
So you need to pass the real service URL
to Axis2 when you use the constructor:
WebsStub stub = new
WebsStub("http://server/_vti_bin/Webs.asmx ");
Paul
On 11/5/07, Das, Amar <am...@fmr.com>
wrote:
Hi:
I generated Java code using wsdl2java
for Microsoft sharepoint web
services
http://server/_vti_bin/Webs.asmx. I am trying to execute the
GetWebCollection methods using the
following code.
<code>
public class TestShare {
public static void main(String[]
args) {
try {
WebsStub stub =
new WebsStub();
// setup NTLM
auth
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setDomain("x");
auth.setUsername
("x");
auth.setPassword("x");
auth.setHost("x");
ArrayList<String> authSchemes = new
ArrayList<String>();
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes);
Options options
= new Options();
options.setProperty(HTTPConstants.AUTHENTICATE,
auth);
ServiceClient
serviceClient =
stub._getServiceClient();
serviceClient.setOptions(options);
// set NTLM auth
serviceClient.getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);
GetWebCollection
wc = new
WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
} catch (Exception e) {
e.printStackTrace();
}
}
}
</code>
I am receiving the following error.
What am I doing wrong?
org.apache.axis2.AxisFault: Address
information does not exist in the
Endpoint Reference (EPR).The system
cannot infer the transport
mechanism.
at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
ava:65)
at
org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
lient.java:302)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:174)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java
:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
)
at
ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail:
axis-user-help@ws.apache.org
--
Paul Fremantle
Co-Founder and VP of Technical Sales,
WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform",
www.wso2.com
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform",
www.wso2.com
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
Re: Sharepoint Web services
Posted by Paul Fremantle <pz...@gmail.com>.
Are you calling
stub._getServiceClient().getOptions().setUsername() and setPassword()?
in your code
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
>
> That's what this portion of the code does or am I wrong?
>
> options.setProperty(HTTPConstants.
> *AUTHENTICATE*, auth);
>
> ServiceClient serviceClient = stub._getServiceClient();
>
> serviceClient.setOptions(options);
>
> ------------------------------
> *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> *Sent:* Monday, November 05, 2007 11:07 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Sharepoint Web services
>
> This looks like you are now getting an error from the server. I assume
> that the server is expecting a username/password to be set.
>
> Paul
>
> On 11/5/07, Das, Amar <am...@fmr.com> wrote:
> >
> > I have checked and found the URL to be valid.
> >
> > I set the options instead and added the following line
> >
> > options.setTo(*new* EndpointReference( http://server/_vti_bin/Webs.asmx
> > ));
> >
> > Now I am getting the following error
> >
> > org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
> >
> > at org.apache.axis2.transport.http.HTTPSender.handleResponse(
> > *HTTPSender.java:298*)
> >
> > at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
> > *HTTPSender.java:192*)
> >
> > at org.apache.axis2.transport.http.HTTPSender.send(
> > *HTTPSender.java:77*)
> >
> > at
> > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons
> > (
> > *CommonsHTTPTransportSender.java:327*)
> >
> > at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> > *CommonsHTTPTransportSender.java:206*)
> >
> > at org.apache.axis2.engine.AxisEngine.send(
> > *AxisEngine.java:396*)
> >
> > at org.apache.axis2.description.OutInAxisOperationClient.send(
> > *OutInAxisOperation.java:374*)
> >
> > at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> > *OutInAxisOperation.java:211*)
> >
> > at org.apache.axis2.client.OperationClient.execute(
> > *OperationClient.java:163*)
> >
> > at com.microsoft.schemas.sharepoint.soap.WebsStub.GetWebCollection(
> > *WebsStub.java:1337*)
> >
> > at ftg.ops.eas.ps.TestShare.main(
> > *TestShare.java:44*)
> >
> > ------------------------------
> > *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> > *Sent:* Monday, November 05, 2007 10:37 AM
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: Sharepoint Web services
> >
> > When Axis2 creates a stub, it hard codes the URL that is in the WSDL
> > into the stub as the default, but you can modify this at runtime. It seems
> > like the URL contained in the WSDL for the server is not valid so the
> > "hard-coded" service URL won't work.
> >
> > So you need to pass the real service URL to Axis2 when you use the
> > constructor:
> >
> > WebsStub stub = new WebsStub("http://server/_vti_bin/Webs.asmx
> > ");
> >
> > Paul
> >
> > On 11/5/07, Das, Amar <am...@fmr.com> wrote:
> > >
> > > Hi:
> > >
> > > I generated Java code using wsdl2java for Microsoft sharepoint web
> > > services http://server/_vti_bin/Webs.asmx. I am trying to execute the
> > > GetWebCollection methods using the following code.
> > >
> > > <code>
> > > public class TestShare {
> > > public static void main(String[] args) {
> > > try {
> > > WebsStub stub = new WebsStub();
> > >
> > > // setup NTLM auth
> > > HttpTransportProperties.Authenticator auth =
> > > new
> > > HttpTransportProperties.Authenticator();
> > > auth.setDomain("x");
> > > auth.setUsername ("x");
> > > auth.setPassword("x");
> > > auth.setHost("x");
> > > ArrayList<String> authSchemes = new
> > > ArrayList<String>();
> > >
> > > authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
> > > auth.setAuthSchemes(authSchemes);
> > >
> > > Options options = new Options();
> > > options.setProperty(
> > > HTTPConstants.AUTHENTICATE,
> > > auth);
> > >
> > > ServiceClient serviceClient =
> > > stub._getServiceClient();
> > > serviceClient.setOptions(options);
> > >
> > > // set NTLM auth
> > > serviceClient.getOptions().setProperty(
> > >
> > > org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
> > > auth);
> > >
> > > GetWebCollection wc = new
> > > WebsStub.GetWebCollection();
> > > stub.GetWebCollection(wc);
> > >
> > > } catch (Exception e) {
> > > e.printStackTrace();
> > > }
> > > }
> > > }
> > > </code>
> > >
> > > I am receiving the following error. What am I doing wrong?
> > > org.apache.axis2.AxisFault: Address information does not exist in the
> > > Endpoint Reference (EPR).The system cannot infer the transport
> > > mechanism.
> > > at
> > > org.apache.axis2.description.ClientUtils.inferOutTransport(
> > > ClientUtils.j
> > > ava:65)
> > > at
> > > org.apache.axis2.client.OperationClient.prepareMessageContext
> > > (OperationC
> > > lient.java:302)
> > > at
> > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl
> > > (OutInA
> > > xisOperation.java:174)
> > > at
> > > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
> > >
> > > )
> > > at
> > > com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java
> > > :1054
> > > )
> > > at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
> > >
> > > Thanks
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
RE: Sharepoint Web services
Posted by "Das, Amar" <am...@fmr.com>.
That's what this portion of the code does or am I wrong?
options.setProperty(HTTPConstants.AUTHENTICATE, auth);
ServiceClient serviceClient = stub._getServiceClient();
serviceClient.setOptions(options);
_____
From: Paul Fremantle [mailto:pzfreo@gmail.com]
Sent: Monday, November 05, 2007 11:07 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
This looks like you are now getting an error from the server. I
assume that the server is expecting a username/password to be set.
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
I have checked and found the URL to be valid.
I set the options instead and added the following line
options.setTo(new EndpointReference(
http://server/_vti_bin/Webs.asmx <http://server/_vti_bin/Webs.asmx> ));
Now I am getting the following error
org.apache.axis2.AxisFault: Transport error: 401 Error:
Unauthorized
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(
HTTPSender.java:298)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(
HTTPSender.java:192)
at org.apache.axis2.transport.http.HTTPSender.send(
HTTPSender.java:77)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(
CommonsHTTPTransportSender.java:327)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(
AxisEngine.java:396)
at
org.apache.axis2.description.OutInAxisOperationClient.send(
OutInAxisOperation.java:374)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(
OperationClient.java:163)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWebCollection(
WebsStub.java:1337)
at ftg.ops.eas.ps.TestShare.main(
TestShare.java:44)
_____
From: Paul Fremantle [mailto:pzfreo@gmail.com]
Sent: Monday, November 05, 2007 10:37 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
When Axis2 creates a stub, it hard codes the URL
that is in the WSDL into the stub as the default, but you can modify
this at runtime. It seems like the URL contained in the WSDL for the
server is not valid so the "hard-coded" service URL won't work.
So you need to pass the real service URL to
Axis2 when you use the constructor:
WebsStub stub = new
WebsStub("http://server/_vti_bin/Webs.asmx ");
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
Hi:
I generated Java code using wsdl2java
for Microsoft sharepoint web
services
http://server/_vti_bin/Webs.asmx. I am trying to execute the
GetWebCollection methods using the
following code.
<code>
public class TestShare {
public static void main(String[]
args) {
try {
WebsStub stub =
new WebsStub();
// setup NTLM
auth
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setDomain("x");
auth.setUsername
("x");
auth.setPassword("x");
auth.setHost("x");
ArrayList<String> authSchemes = new
ArrayList<String>();
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes);
Options options
= new Options();
options.setProperty(HTTPConstants.AUTHENTICATE,
auth);
ServiceClient
serviceClient =
stub._getServiceClient();
serviceClient.setOptions(options);
// set NTLM auth
serviceClient.getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);
GetWebCollection
wc = new
WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
} catch (Exception e) {
e.printStackTrace();
}
}
}
</code>
I am receiving the following error.
What am I doing wrong?
org.apache.axis2.AxisFault: Address
information does not exist in the
Endpoint Reference (EPR).The system
cannot infer the transport
mechanism.
at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
ava:65)
at
org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
lient.java:302)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:174)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
)
at
ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail:
axis-user-help@ws.apache.org
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform",
www.wso2.com
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
Re: Sharepoint Web services
Posted by Paul Fremantle <pz...@gmail.com>.
This looks like you are now getting an error from the server. I assume that
the server is expecting a username/password to be set.
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
>
> I have checked and found the URL to be valid.
>
> I set the options instead and added the following line
>
> options.setTo(*new* EndpointReference(http://server/_vti_bin/Webs.asmx));
>
> Now I am getting the following error
>
> org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
>
> at org.apache.axis2.transport.http.HTTPSender.handleResponse(
> *HTTPSender.java:298*)
>
> at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
> *HTTPSender.java:192*)
>
> at org.apache.axis2.transport.http.HTTPSender.send(
> *HTTPSender.java:77*)
>
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons
> (
> *CommonsHTTPTransportSender.java:327*)
>
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> *CommonsHTTPTransportSender.java:206*)
>
> at org.apache.axis2.engine.AxisEngine.send(
> *AxisEngine.java:396*)
>
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> *OutInAxisOperation.java:374*)
>
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> *OutInAxisOperation.java:211*)
>
> at org.apache.axis2.client.OperationClient.execute(
> *OperationClient.java:163*)
>
> at com.microsoft.schemas.sharepoint.soap.WebsStub.GetWebCollection(
> *WebsStub.java:1337*)
>
> at ftg.ops.eas.ps.TestShare.main(
> *TestShare.java:44*)
>
> ------------------------------
> *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> *Sent:* Monday, November 05, 2007 10:37 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Sharepoint Web services
>
> When Axis2 creates a stub, it hard codes the URL that is in the WSDL into
> the stub as the default, but you can modify this at runtime. It seems like
> the URL contained in the WSDL for the server is not valid so the
> "hard-coded" service URL won't work.
>
> So you need to pass the real service URL to Axis2 when you use the
> constructor:
>
> WebsStub stub = new WebsStub("http://server/_vti_bin/Webs.asmx
> ");
>
> Paul
>
> On 11/5/07, Das, Amar <am...@fmr.com> wrote:
> >
> > Hi:
> >
> > I generated Java code using wsdl2java for Microsoft sharepoint web
> > services http://server/_vti_bin/Webs.asmx. I am trying to execute the
> > GetWebCollection methods using the following code.
> >
> > <code>
> > public class TestShare {
> > public static void main(String[] args) {
> > try {
> > WebsStub stub = new WebsStub();
> >
> > // setup NTLM auth
> > HttpTransportProperties.Authenticator auth = new
> > HttpTransportProperties.Authenticator();
> > auth.setDomain("x");
> > auth.setUsername ("x");
> > auth.setPassword("x");
> > auth.setHost("x");
> > ArrayList<String> authSchemes = new
> > ArrayList<String>();
> >
> > authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
> > auth.setAuthSchemes(authSchemes);
> >
> > Options options = new Options();
> > options.setProperty(HTTPConstants.AUTHENTICATE,
> > auth);
> >
> > ServiceClient serviceClient =
> > stub._getServiceClient();
> > serviceClient.setOptions(options);
> >
> > // set NTLM auth
> > serviceClient.getOptions().setProperty(
> >
> > org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
> > auth);
> >
> > GetWebCollection wc = new
> > WebsStub.GetWebCollection();
> > stub.GetWebCollection(wc);
> >
> > } catch (Exception e) {
> > e.printStackTrace();
> > }
> > }
> > }
> > </code>
> >
> > I am receiving the following error. What am I doing wrong?
> > org.apache.axis2.AxisFault: Address information does not exist in the
> > Endpoint Reference (EPR).The system cannot infer the transport
> > mechanism.
> > at
> > org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
> > ava:65)
> > at
> > org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
> > lient.java:302)
> > at
> > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
> > xisOperation.java:174)
> > at
> > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
> > )
> > at
> > com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
> > )
> > at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
RE: Sharepoint Web services
Posted by "Das, Amar" <am...@fmr.com>.
I have checked and found the URL to be valid.
I set the options instead and added the following line
options.setTo(new EndpointReference(http://server/_vti_bin/Webs.asmx
<http://server/_vti_bin/Webs.asmx> ));
Now I am getting the following error
org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.jav
a:298)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1
92)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:327)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:374)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWebCollection(WebsStub
.java:1337)
at ftg.ops.eas.ps.TestShare.main(TestShare.java:44)
_____
From: Paul Fremantle [mailto:pzfreo@gmail.com]
Sent: Monday, November 05, 2007 10:37 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
When Axis2 creates a stub, it hard codes the URL that is in the
WSDL into the stub as the default, but you can modify this at runtime.
It seems like the URL contained in the WSDL for the server is not valid
so the "hard-coded" service URL won't work.
So you need to pass the real service URL to Axis2 when you use
the constructor:
WebsStub stub = new
WebsStub("http://server/_vti_bin/Webs.asmx ");
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
Hi:
I generated Java code using wsdl2java for Microsoft
sharepoint web
services http://server/_vti_bin/Webs.asmx. I am trying
to execute the
GetWebCollection methods using the following code.
<code>
public class TestShare {
public static void main(String[] args) {
try {
WebsStub stub = new WebsStub();
// setup NTLM auth
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setDomain("x");
auth.setUsername ("x");
auth.setPassword("x");
auth.setHost("x");
ArrayList<String> authSchemes =
new
ArrayList<String>();
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes);
Options options = new Options();
options.setProperty(HTTPConstants.AUTHENTICATE,
auth);
ServiceClient serviceClient =
stub._getServiceClient();
serviceClient.setOptions(options);
// set NTLM auth
serviceClient.getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);
GetWebCollection wc = new
WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
} catch (Exception e) {
e.printStackTrace();
}
}
}
</code>
I am receiving the following error. What am I doing
wrong?
org.apache.axis2.AxisFault: Address information does not
exist in the
Endpoint Reference (EPR).The system cannot infer the
transport
mechanism.
at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
ava:65)
at
org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
lient.java:302)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:174)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
)
at
ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail:
axis-user-help@ws.apache.org
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
Re: Sharepoint Web services
Posted by Paul Fremantle <pz...@gmail.com>.
When Axis2 creates a stub, it hard codes the URL that is in the WSDL into
the stub as the default, but you can modify this at runtime. It seems like
the URL contained in the WSDL for the server is not valid so the
"hard-coded" service URL won't work.
So you need to pass the real service URL to Axis2 when you use the
constructor:
WebsStub stub = new WebsStub("
http://server/_vti_bin/Webs.asmx");
Paul
On 11/5/07, Das, Amar <am...@fmr.com> wrote:
>
> Hi:
>
> I generated Java code using wsdl2java for Microsoft sharepoint web
> services http://server/_vti_bin/Webs.asmx. I am trying to execute the
> GetWebCollection methods using the following code.
>
> <code>
> public class TestShare {
> public static void main(String[] args) {
> try {
> WebsStub stub = new WebsStub();
>
> // setup NTLM auth
> HttpTransportProperties.Authenticator auth = new
> HttpTransportProperties.Authenticator();
> auth.setDomain("x");
> auth.setUsername("x");
> auth.setPassword("x");
> auth.setHost("x");
> ArrayList<String> authSchemes = new
> ArrayList<String>();
>
> authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
> auth.setAuthSchemes(authSchemes);
>
> Options options = new Options();
> options.setProperty(HTTPConstants.AUTHENTICATE,
> auth);
>
> ServiceClient serviceClient =
> stub._getServiceClient();
> serviceClient.setOptions(options);
>
> // set NTLM auth
> serviceClient.getOptions().setProperty(
>
> org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
> auth);
>
> GetWebCollection wc = new
> WebsStub.GetWebCollection();
> stub.GetWebCollection(wc);
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> </code>
>
> I am receiving the following error. What am I doing wrong?
> org.apache.axis2.AxisFault: Address information does not exist in the
> Endpoint Reference (EPR).The system cannot infer the transport
> mechanism.
> at
> org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
> ava:65)
> at
> org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
> lient.java:302)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
> xisOperation.java:174)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
> )
> at
> com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
> )
> at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
Re: Sharepoint Web services
Posted by Martin Gainty <mg...@hotmail.com>.
your namespaces are not resolvable outside of Sharepoint environment Resolvable?
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" Yes
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" Yes
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" Yes
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/ No has been replaced by http://schemas.xmlsoap.org/wsdl/soap12/wsdl11soap12.xsd
xmlns:ns0="http://soap.sharepoint.schemas.microsoft.com/xsd" No
xmlns:ns1="http://rmi.java/xsd" No
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" Yes
xmlns:ns3="http://io.java/xsd" No
xmlns:ns2="http://soap.sharepoint.schemas.microsoft.com" No
xmlns:xs="http://www.w3.org/2001/XMLSchema" No has been replaced by http://www.w3.org/2001/XMLSchema.xsd
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" Yes
targetNamespace=http://soap.sharepoint.schemas.microsoft.com> No
I got this far with your WSDL running OperationClient
java com.microsoft.schemas.sharepoint.soap.OperationClient
fault exception =Message Receiver not found for AxisOperation: GetWeb
so I looked at the Request and Response Message Declarations from the supplied WSDL
<wsdl:message name="GetWebRequest">
<wsdl:part name="parameters" element="ns2:GetWeb" />
</wsdl:message>
<wsdl:message name="GetWebResponse">
<wsdl:part name="parameters" element="ns2:GetWebResponse" />
</wsdl:message>
since ns2 is not resolvable I cant go any further
does anyone have access to the sharepoint schemas?
http://msdn2.microsoft.com/en-us/library/aa494918.aspx
Martin--
----- Original Message -----
From: Das, Amar
To: axis-user@ws.apache.org
Sent: Monday, November 05, 2007 11:58 AM
Subject: RE: Sharepoint Web services
Could not quite follow the question. OperationClient is part of the axis2 library.
----------------------------------------------------------------------------
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Monday, November 05, 2007 11:43 AM
To: axis-user@ws.apache.org
Subject: RE: Sharepoint Web services
OperationClient.java ?
Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Subject: RE: Sharepoint Web services
> Date: Mon, 5 Nov 2007 10:45:01 -0500
> Wrom: IVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOW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DULHPQQWOYIYZUNNYCGPKYLEJG("x");
> auth.setHost("x");
> ArrayList<String> authSchemes = new
> ArrayList<String>();
>
> authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
> auth.setAuthSchemes(authSchemes);
>
> Options options = new Options();
> options.setProperty(HTTPConstants.AUTHENTICATE,
> auth);
>
> ServiceClient serviceClient =
> stub._getServiceClient();
> serviceClient.setOptions(options);
>
> // set NTLM auth
> serviceClient.getOptions().setProperty(
>
> org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
> auth);
>
> GetWebCollection wc = new
> WebsStub.GetWebCollection();
> stub.GetWebCollection(wc);
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> </code>
>
> I am receiving the following error. What am I doing wrong?
> org.apache.axis2.AxisFault: Address information does not exist in the
> Endpoint Reference (EPR).The system cannot infer the transport
> mechanism.
> at
> org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
> ava:65)
> at
> org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
> lient.java:302)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
> xisOperation.java:174)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
> )
> at
> com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
> )
> at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
----------------------------------------------------------------------------
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today!
RE: Sharepoint Web services
Posted by "Das, Amar" <am...@fmr.com>.
Could not quite follow the question. OperationClient is part of the axis2 library.
_____
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Monday, November 05, 2007 11:43 AM
To: axis-user@ws.apache.org
Subject: RE: Sharepoint Web services
OperationClient.java ?
Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Subject: RE: Sharepoint Web services
> Date: Mon, 5 Nov 2007 10:45:01 -0500
> Wrom: IVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWF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ransportProperties.Authenticator.NTLM);
> auth.setAuthSchemes(authSchemes);
>
> Options options = new Options();
> options.setProperty(HTTPConstants.AUTHENTICATE,
> auth);
>
> ServiceClient serviceClient =
> stub._getServiceClient();
> serviceClient.setOptions(options);
>
> // set NTLM auth
> serviceClient.getOptions().setProperty(
>
> org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
> auth);
>
> GetWebCollection wc = new
> WebsStub.GetWebCollection();
> stub.GetWebCollection(wc);
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> </code>
>
> I am receiving the following error. What am I doing wrong?
> org.apache.axis2.AxisFault: Address information does not exist in the
> Endpoint Reference (EPR).The system cannot infer the transport
> mechanism.
> at
> org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
> ava:65)
> at
> org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
> lient.java:302)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
> xisOperation.java:174)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
> )
> at
> com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
> )
> at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
_____
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today! <http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline>
RE: Sharepoint Web services
Posted by Martin Gainty <mg...@hotmail.com>.
OperationClient.java ?Martin Gainty______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content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AXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJG("x");> auth.setHost("x");> ArrayList<String> authSchemes = new> ArrayList<String>();> > authSchemes.add(HttpTransportProperties.Authenticator.NTLM);> auth.setAuthSchemes(authSchemes);> > Options options = new Options();> options.setProperty(HTTPConstants.AUTHENTICATE,> auth);> > ServiceClient serviceClient => stub._getServiceClient();> serviceClient.setOptions(options);> > // set NTLM auth> serviceClient.getOptions().setProperty(> > org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,> auth);> > GetWebCollection wc = new> WebsStub.GetWebCollection();> stub.GetWebCollection(wc);> > } catch (Exception e) {> e.printStackTrace();> }> }> }> </code>> > I am receiving the following error. What am I doing wrong?> org.apache.axis2.AxisFault: Address information does not exist in the> Endpoint Reference (EPR).The system cannot infer the transport> mechanism.> at> org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j> ava:65)> at> org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC> lient.java:302)> at> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA> xisOperation.java:174)> at> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163> )> at> com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054> )> at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)> > Thanks> > ---------------------------------------------------------------------> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> For additional commands, e-mail: axis-user-help@ws.apache.org> > > > ---------------------------------------------------------------------> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> For additional commands, e-mail: axis-user-help@ws.apache.org> >
_________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
RE: Sharepoint Web services
Posted by "Das, Amar" <am...@fmr.com>.
The WSDL as-well-as the generated code is attached.
I am confused. The default constructor sets the target endpoint
public WebsStub() throws org.apache.axis2.AxisFault {
this("http://server/_vti_bin/Webs.asmx");
}
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Monday, November 05, 2007 10:33 AM
To: axis-user@ws.apache.org
Subject: Re: Sharepoint Web services
You never set the EPR..If you want more help.. post the WSDL
Here is an example of EPR
<wsdl:port name="SimpleAddServiceSOAP11port_http"
binding="ns0:SimpleAddServiceSOAP11Binding">
<soap:address
location="http://localhost:8080/axis2/services/SimpleAddService"/>
</wsdl:port>
M--
----- Original Message -----
From: "Das, Amar" <am...@fmr.com>
To: <ax...@ws.apache.org>
Sent: Monday, November 05, 2007 10:19 AM
Subject: Sharepoint Web services
Hi:
I generated Java code using wsdl2java for Microsoft sharepoint web
services http://server/_vti_bin/Webs.asmx. I am trying to execute the
GetWebCollection methods using the following code.
<code>
public class TestShare {
public static void main(String[] args) {
try {
WebsStub stub = new WebsStub();
// setup NTLM auth
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setDomain("x");
auth.setUsername("x");
auth.setPassword("x");
auth.setHost("x");
ArrayList<String> authSchemes = new
ArrayList<String>();
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes);
Options options = new Options();
options.setProperty(HTTPConstants.AUTHENTICATE,
auth);
ServiceClient serviceClient =
stub._getServiceClient();
serviceClient.setOptions(options);
// set NTLM auth
serviceClient.getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);
GetWebCollection wc = new
WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
} catch (Exception e) {
e.printStackTrace();
}
}
}
</code>
I am receiving the following error. What am I doing wrong?
org.apache.axis2.AxisFault: Address information does not exist in the
Endpoint Reference (EPR).The system cannot infer the transport
mechanism.
at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
ava:65)
at
org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
lient.java:302)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:174)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
)
at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Sharepoint Web services
Posted by Martin Gainty <mg...@hotmail.com>.
You never set the EPR..If you want more help.. post the WSDL
Here is an example of EPR
<wsdl:port name="SimpleAddServiceSOAP11port_http"
binding="ns0:SimpleAddServiceSOAP11Binding">
<soap:address
location="http://localhost:8080/axis2/services/SimpleAddService"/>
</wsdl:port>
M--
----- Original Message -----
From: "Das, Amar" <am...@fmr.com>
To: <ax...@ws.apache.org>
Sent: Monday, November 05, 2007 10:19 AM
Subject: Sharepoint Web services
Hi:
I generated Java code using wsdl2java for Microsoft sharepoint web
services http://server/_vti_bin/Webs.asmx. I am trying to execute the
GetWebCollection methods using the following code.
<code>
public class TestShare {
public static void main(String[] args) {
try {
WebsStub stub = new WebsStub();
// setup NTLM auth
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setDomain("x");
auth.setUsername("x");
auth.setPassword("x");
auth.setHost("x");
ArrayList<String> authSchemes = new
ArrayList<String>();
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes);
Options options = new Options();
options.setProperty(HTTPConstants.AUTHENTICATE,
auth);
ServiceClient serviceClient =
stub._getServiceClient();
serviceClient.setOptions(options);
// set NTLM auth
serviceClient.getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);
GetWebCollection wc = new
WebsStub.GetWebCollection();
stub.GetWebCollection(wc);
} catch (Exception e) {
e.printStackTrace();
}
}
}
</code>
I am receiving the following error. What am I doing wrong?
org.apache.axis2.AxisFault: Address information does not exist in the
Endpoint Reference (EPR).The system cannot infer the transport
mechanism.
at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.j
ava:65)
at
org.apache.axis2.client.OperationClient.prepareMessageContext(OperationC
lient.java:302)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:174)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
com.microsoft.schemas.sharepoint.soap.WebsStub.GetWeb(WebsStub.java:1054
)
at ftg.ops.eas.ps.TestShare.main(TestShare.java:45)
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org