File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 5
5
use CodeDredd \Soap \Xml \SoapXml ;
6
6
use CodeDredd \Soap \Xml \XMLSerializer ;
7
7
use Illuminate \Support \Arr ;
8
+ use Illuminate \Support \Str ;
8
9
9
10
/**
10
11
* Class Request.
@@ -30,10 +31,16 @@ public function __construct($request)
30
31
}
31
32
32
33
/**
34
+ * Get the soap action for soap 1.1 and 1.2
33
35
* @return string
34
36
*/
35
37
public function action (): string
36
38
{
39
+ $ contentType = $ this ->request ->getHeaderLine ('Content-Type ' );
40
+ $ soapAction = $ this ->request ->getHeaderLine ('SOAPAction ' );
41
+ if (empty ($ soapAction )) {
42
+ return Str::of ($ contentType )->afterLast ('action= ' )->remove ('" ' );
43
+ }
37
44
return $ this ->request ->getHeaderLine ('SOAPAction ' );
38
45
}
39
46
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ public function testSoapOptions(): void
135
135
136
136
self ::assertTrue ($ response ->ok ());
137
137
self ::assertStringContainsString ('application/soap+xml; charset="utf-8 ' , $ lastRequestInfo ->getLastRequestHeaders ());
138
+ Soap::assertActionCalled ('Get_User ' );
138
139
}
139
140
140
141
public function testRealSoapCall (): void
You can’t perform that action at this time.
0 commit comments