I know this topic have been covered more than once, but I can't get it
running. First of all I updated HttpAccess2 to the newest version
2.0.7. Then I updated soap4r to the latest version (I tried almost all
recent versions) and following that I user the following script to
connect to the service description:
#################################
require 'soap/wsdlDriver'
WSDL_URL = 'http://my_server_address/ews/services.wsdl'
s = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver
s.options['protocol.http.basic_auth'] << [WSDL_URL, 'my_user_name',
'my_pass']
#################################
But no matter what I do, the script is aborted telling me that in the
method "retry_connect" at line 382 it encountered an unexpected
response:
#################################
Unexpected response: #<HTTP::Message::Headers:0x14e70e0
@body_type=nil, @request_method=nil, @chunked=false, @body_date=nil,
@request_via_proxy=nil, @http_version="1.1",
@reason_phrase="Unauthorized", @body_size=0, @request_query=nil,
@is_request=false, @response_status_code=401, @body_charset=nil,
@request_uri=nil, @header_item=[["Content-Length", "1656"], ["Content-
Type", "text/html"], ["Server", "Microsoft-IIS/6.0"], ["WWW-
Authenticate", "Negotiate"], ["WWW-Authenticate", "NTLM"], ["X-Powered-
By", "ASP.NET"], ["Date", "Tue, 12 Jun 2007 17:27:33 GMT"]]>
#################################
Sorry to bother you, but I have no idea how this should work, as the
factory seems to try to connect before it really knows about the
username and password. Or am I really that stupid?
Thanks a lot... spent almost half the day to figura out whats going on
here... but I have no clue at all :(
Max
Hi,
namxam wrote:
> I know this topic have been covered more than once, but I can't get it
> running. First of all I updated HttpAccess2 to the newest version
> 2.0.7. Then I updated soap4r to the latest version (I tried almost all
> recent versions) and following that I user the following script to
> connect to the service description:
According to the response you post, unfortunately the server requires
NTLM authentication. Current soap4r does not support NTLM authentication.
* recent net/http supoprts NTLM auth but there's no way to use the
feature from soap4r now.
* http-access2 cannot handle NTLM auth. Kindly Justin Bailey who
implemented net/http + NTLM feature told me to help so I'll add the
feature in http-access/2.0.8.
For now, you need to download the WSDL as a local file to use. Sorry
for the inconvenience.
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iQEVAwUBRm9U7R9L2jg5EEGlAQJasgf+M7Fn5+e/MhysGBSBaQ7WxcRfTU9G3m1U
FfsGc9GrNMA6sQDkkZ8c/fFJrqqSG+2b79nhk+UdGAoZZWygIDHqGGiO0lyzbQBA
K4/HqYiBotDSMFtarIeX7ABcUGdwOjOQAG0v6GF+IkBv9Ji/iJxrs30BGWC58OhM
zd0vtq5MVkyfKInSlo8WieQksA+3XuNrkJo6r3lWz+GvMnPVCxiVBXTXrjDi0wwM
Yk3aIalnFH0Zt3YWfDhe634biAOefeSMvQSAxAt0ud8m3e5jJyYzl/MLhcYFy6DF
afERSCQGccbLf3qAxfAUpMWOLBeTPepA5I4VQxe8DHBvxB7IXEOZ8w==
=4aRA
-----END PGP SIGNATURE-----
Or do you have any ideas when 2.0.8 will be released, or at least when
the code will come up in the trunk?
Max
#######################################
Unexpected response: #<HTTP::Message::Headers:0x1493f6c @body_size=0,
@request_query=nil, @is_request=false, @response_status_code=401,
@body_charset=nil, @request_uri=nil, @header_item=[["Content-Length",
"1656"], ["Content-Type", "text/html"], ["Server", "Microsoft-IIS/
6.0"], ["WWW-Authenticate", "Basic realm=\"exchange.i2connect.de\""],
["X-Powered-By", "ASP.NET"], ["Date", "Wed, 13 Jun 2007 16:56:33
GMT"]], @body_type=nil, @request_method=nil, @chunked=false,
@body_date=nil, @request_via_proxy=nil, @http_version="1.1",
@reason_phrase="Unauthorized">
######################################
Hi,
namxam wrote:
> Ok, I changed the server settings to user basic authentication with
> clear text passwords. Still i am getting error messages.
Ths client you are using is the same as below, right?
> require 'soap/wsdlDriver'
>
> WSDL_URL = 'http://my_server_address/ews/services.wsdl'
>
> s = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver
> s.options['protocol.http.basic_auth'] << [WSDL_URL, 'my_user_name',
> 'my_pass']
It's too late that setting basic_auth parameter through 's.options'
after creating driver. You need to create soap/property file to set the
basic_auth param.
% cat soap/property
client.protocol.http.basic_auth.1.url = http://server/url
client.protocol.http.basic_auth.1.userid = my_user_name
client.protocol.http.basic_auth.1.password = my_pass
% ruby -I. test_client.rb
'soap/property' must be located somewhere on $LOAD_PATH so you may need
to add '-I' as a command line option of ruby.
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
iQEVAwUBRnBo2B9L2jg5EEGlAQLHmggAnVMpBiNRIyUKgA12uWErHuetD7arcokO
2Y34/yKj8mm0EdAF2Kcr1bUEEk1Jbz9cWiDKlCwtoRH/lO5zb9uye2N3w2OWde5S
1ES8k5VUwXsNj2v528UUEox6GuinRkxIoywNrAu2msiDH1XPnac+k8/9Io4gRW9j
dqTAdpU5yGH31MYPlsl5d9bmmD41+pnGXKxtYmBLpPp1z51TZguqrJseo5kaJmvm
SD3tARg7FItIZSqnxARE71q9ss3Xd7IQbQ1dHiVy/1Ijo3yNdTYoK+bOINSG32n/
GHwVoDQlapUoyfFT+guQQ92pBwZ7QUydp1U7X9E3qz/eM61hrsELTg==
=Uyyv
-----END PGP SIGNATURE-----
I think everything works almost perfectly as I can connect to services
like the google search api. Unfortunately, the service I am trying to
connect to is a microsoft exchange server 2007 and I think soap4r
doesn't like the wsdl specification file:
#######################
ignored element: {http://www.w3.org/2001/XMLSchema}simpleType of
WSDL::XMLSchema::Union
ignored attr: {}abstract
ignored attr: {}substitutionGroup
ignored element: {http://www.w3.org/2001/XMLSchema}attributeGroup of
WSDL::XMLSchema::Schema
ignored element: {http://www.w3.org/2001/XMLSchema}group of
WSDL::XMLSchema::Schema
ignored element: {http://www.w3.org/2001/XMLSchema}minInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}maxInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}attributeGroup of
WSDL::XMLSchema::ComplexExtension
/Applications/Locomotive/Bundles/rmagickRailsJan2007_ppc.locobundle/
framework/lib/ruby/site_ruby/1.8/soap/wsdlDriver.rb:65:in `find_port':
service not found in WSDL (SOAP::WSDLDriverFactory::FactoryError)
from /Applications/Locomotive/Bundles/
rmagickRailsJan2007_ppc.locobundle/framework/lib/ruby/site_ruby/1.8/
soap/wsdlDriver.rb:37:in `create_rpc_driver'
from service.rb:10
#######################
I don't know if anyone is willing to help me on this issue, but it
would be really cool ;) I would attach the service definition files,
but they are huge. But there is some info on their website:
Service Architecture: http://msdn2.microsoft.com/en-us/library/aa579369.aspx
Schema Architecture: http://msdn2.microsoft.com/en-us/library/aa579406.aspx
Hi,
namxam wrote:
> Thank you very much. This works perfectly after upgrading to 1.5.6.
> But life would be to easy if things would work right out of the box,
> so I have a new problem :p
X(
> I think everything works almost perfectly as I can connect to services
> like the google search api. Unfortunately, the service I am trying to
> connect to is a microsoft exchange server 2007 and I think soap4r
> doesn't like the wsdl specification file:
As I wrote about NBN service before, you have no choice but to ignore
WSDL warnings. But...
> /Applications/Locomotive/Bundles/rmagickRailsJan2007_ppc.locobundle/
> framework/lib/ruby/site_ruby/1.8/soap/wsdlDriver.rb:65:in `find_port':
> service not found in WSDL (SOAP::WSDLDriverFactory::FactoryError)
> from /Applications/Locomotive/Bundles/
The WSDL you are using should not have <service> element in it. Can you
confirm it?
> I don't know if anyone is willing to help me on this issue, but it
> would be really cool ;) I would attach the service definition files,
> but they are huge. But there is some info on their website:
>
> Service Architecture: http://msdn2.microsoft.com/en-us/library/aa579369.aspx
> Schema Architecture: http://msdn2.microsoft.com/en-us/library/aa579406.aspx
Please send me a file directly if it is allowed. According to the
webisite above, it seems to need some extra implementation about WS-*
features...
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
iQEVAwUBRnOweR9L2jg5EEGlAQJcqQgAjp3ubpHAra1D9f8UW5SoKwQvH2iL/IrG
Qi8FbJPB9d2yAxNKb6PxA9wgUKaILMN3MPYPzsLM69QIwxC3xz0JrPtKkhpXPwDe
EW2ZHYHhgIaZtvsn4F8chupYvBSgupEXY1y9EB6uqRsg2bgHSz26THkVe6SdqInQ
Z0GGLDAfeFE3q7diVquDo81okVGZB3OG7le9mu8G/CDc6AbCm3lNPSSOo3OaKBAI
9WJZzj3SjiIqBwUajAYOvWnCQzeO6Q4/adp6iKmeSIzFlZnpzvC7PZvoxL/w6f+2
yiRMwkfL8ud+8cPsNNNUmu7WHgSZTaArsBWZUnTcGpbwexdleRDbtw==
=4BQz
-----END PGP SIGNATURE-----